AnsweredAssumed Answered

Help with script to set action on finding empty set.

Question asked by Charlie999 on Dec 15, 2011
Latest reply on Dec 15, 2011 by philmodjunk

Title

Help with script to set action on finding empty set.

Post

Hi

Im trying to wrire a script to search records and then perform action A with records in the found set but if the found set is empty then perform action B.

My script is as follows:

Go to a layout

Show All records

Perform find

     If Get last Error =401

     Action B

     End if

Action A

This works OK when records in found set i get Action A.  But when found set is 0 I get an error message saying No items match find citeria then 3 options.  Modify, cancel or continue.  If I click continue I get action B.

How do I stop that error message in the first instance and go direct to Action B?

Any ideas?

 

 

Outcomes