Page 1 of 1

Using the same event name in multiple events

Posted: Fri Mar 12, 2010 12:48 pm
by lodilefty
It is common, if not essential, to use the exact same event name in several events.

It is a powerful tool, to save on text strings and to actually do a "poor man's OR" event.

Note one huge potential pitfall:
ALL of the events using a common name will have the "MaxOccurs" set to [color="Red"]the smallest value of ANY [/color]of the events.

Thus, if 5 events are named "evt_nam_test" with MaxOccurs at 999, and one event with "evt_nam_test" is set to MaxOccurs 1, then the MaxOccurs for all is 1 [this was bugging a MC event in RoP].

This is due to the way the engine keeps track of MaxOccurs and CuOccurs [you can see status of all events in the .hst files, near the end]

Posted: Fri Mar 12, 2010 3:31 pm
by Pocus
why Poor Man? I find your usage of 'same name' creative!!

Posted: Fri Mar 12, 2010 4:33 pm
by Hobbes
Can you give an example of how this might be used? I would have just expected to either get an error or both events to fire?

Cheers, Chris

Posted: Fri Mar 12, 2010 4:34 pm
by Hobbes
Aha - I suddenly get it! :)