March 10, 200817 yr I am having difficulty find a way to exit a script that incorporates a find. I want to be able to exit the script and return to browse mode if no records are found without the user having the option to "modify find" or "continue". Anyone have any suggestions? Thanks!
March 10, 200817 yr Since this this is about find and not constrain found set, is it pretty straight forward: Set Error Capture [ On ] Perform Find [ ] If [ not Get ( FoundCount ) ] Show All Records Exit Script [ ] End If Set Error Capture [ Off ] While it when constrain is in action must have measures to recreate the found set, such as: http://www.sumware.net/robfm/savingfoundsets.php ...shown in this template: http://www.kevinfrank.com/download/preserve-and-restore-found-sets.zip --sd
March 10, 200817 yr Hi Bonngo, I use the below script for basically what you are asking. Hope it gets you headed in the right direction. Set Error Capture[On] Enter Find Mode[Restore] Perform Find If[Get(lastError)=401] Show Custom Dialog["Message";"No Units have shipped today!"] Exit Script[] End If Soren is fast this morning. I need more coffee : But it shows you another method of the same thing. Michael Edited March 10, 200817 yr by Guest Missing bracket
March 10, 200817 yr Soren, Why the Set error step off at the end of the script? I'm not in practice of turming it off at the end of a script. Should I be? Michael
March 10, 200817 yr No only if the script procedes on futher, the state evaporates when the script is terminated, but often are they only on halt/pause if the scripting is recursive, or perpertuate scripting is going on to avoid users getting stucked in findmode. Examine that a button have several modes to deal with the eventually running script, halt, exit, resume and pause. --sd
Create an account or sign in to comment