1 Reply Latest reply on Dec 11, 2012 7:00 AM by philmodjunk

    Constrain Found Set Script



      Constrain Found Set Script


           I would like use a constrain found set in a script, but I need to ask the user to choose from several options for different variables before it I do it.  And unfortunately I am not having success in doing so. 

           I need to ask the user what project leader they are looking for, what year they are looking for, as well as if they want jobs that are open or closed.  All fields, are defined, project leader, year, and status (open or close).  And I am able to do finds using one variable at a time through several script steps.  But I am not having success using the constrain found set in a script, since I am having to ask for multiple responses.

           Any help or direction would be appreciated


        • 1. Re: Constrain Found Set Script

               Use fields with global storage specied to collect the user specified criteria, then use a script that enters find mode and uses set field steps to created the needed criteria from the data in the global fields and then constrains the found set:

               #This example uses just one such global field, you just need to add more global fields and set field steps for additional criteria to be used
               Enter Find Mode[] ---> clear the pause check box
               Set Field [YourTable::YourFields ; Globals::gYourGlobalFIeld] ---> Global storage must be specified in field options or this doesn't work
               Set Error Capture [on] ---> Keeps "no records fround" error dialog from interrupting your script
               Constrain Found Set []