cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
63
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: null on 17-05-2004 08:30:45 PM
Hi,
If I want to add an assignment statement to all the "no input" and "no match" [b:563b2e35b1]catch [/b:563b2e35b1]elements that exists within a named [b:563b2e35b1]field[/b:563b2e35b1], how would I accomplish the task? If I have the VFieldObject, could I just use the [b:563b2e35b1]add[/b:563b2e35b1] action method to do the [b:563b2e35b1]assign [/b:563b2e35b1]element? Doing it this way would not seem to work since I want to add the [b:563b2e35b1]assign [/b:563b2e35b1]element to only the "no match" and the "no input" [b:563b2e35b1]catch[/b:563b2e35b1] event elements.

Subject: RE: No Match and No Input catch events
Replied by: Michael Bochynski on 19-05-2004 01:36:14 PM
Hi,

The NoMatch and NoInput are separate, built-in events. First, you have to add a VEvent object for each event ­ NoMatch and NoInput. Then in the each VEvent object you have to add VAction representing any assigns you would like to add to the given event.

Please refer to the sample code, VFCExample2.java for the sample code definifng such events.

Hope this helps,
Michael

Subject: RE: No Match and No Input catch events
Replied by: null on 19-05-2004 06:23:33 PM
Hi,
Thank you for the explanation. Suppose there are three catch elements for a No Match. Do I need to add the assignment to each one? Would using the VEvent.getMaxCount() return the largest count or the number of no match catch elements? It looks like it returns the largest event, so do I need to use the VEvent.containsCount(int count) to verify it exists then add my assign element?

Thanks in advance

Subject: RE: No Match and No Input catch events
Replied by: Michael Bochynski on 21-05-2004 11:33:09 PM
Hi,

Adding the assignment for the each catch count would depend on the scenario you are trying to achieve. For example, if you want check whether NoMatch occurred you can modify only the first count. On the other hand, if you want to count the number of occurred events, you would have to add the assignment to all counts.

As far as your two latter question are concerned, the answers are â¿¿Yesâ¿¿. The VEvent.getMaxCount() does return the highest count of NoMatch catch elements and VEvent.containsCount(int count) checks existence of a given count.

Regards,
Michael

Subject: RE: No Match and No Input catch events
Replied by: null on 24-05-2004 09:33:41 PM
It's working. Thanks!
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links