AnsweredAssumed Answered

Usage of constrain found set in a script

Question asked by glennatenr on Jan 16, 2017
Latest reply on Jan 17, 2017 by glennatenr



I am having a problem with an automated script.  We want the user to be able to create a found set of records

but only records that are of their sales.  The user is constrained to only their records on entering the application

and that works fine.


If I is use a button (say #1) with the script:    Enter Find Mode [Pause:Off]    The user is able to make their selection but other users records

appear as well in the search result.


If I have another scripted button (say #2) with the script :


IF [Get ( AccountPrivilegeSetName)= "user"]

      Constrain Found Set  [Restore]                        *  (where the constraint is on their login name)

End IF


The action from button (#2) properly constrains the result from (#1) and displays the proper data.   If we place all of the script in one place  with both commands it fails to execute.  I assume that since the end result works that the scripting is correct, but even trying to call script #2 from button #1 fails to work.


If the script executes correctly separately by hitting 2 different buttons,  why wouldn't it work in one script.


Any Ideas ?