Slobey Posted September 3, 2005 Posted September 3, 2005 Hi gang, I am writing a script that uses the tab order to set the fields. I am trying to use the go to next field step but how do I exit a loop? I know I can manually count the number of fields in the layout and use a script variable, but is there an easier way? Thanks in advance
IdealData Posted September 3, 2005 Posted September 3, 2005 There are many ways to exit the script, so it depends on your decision criteria. You could use the field name as a trigger to exit. What is your script attempting to do ? I have used scripts extensively to perform my own validation routines, and have also used the tab sequence on occasions.
Søren Dyhr Posted September 3, 2005 Posted September 3, 2005 A genuine version 8 method is to store Get(ActiveFieldName) in a variable after initially Go To Field without focus followed by a Go To Next Field. This will bring you to the first field in the layout and putting it into a variable makes a reference for the looping, so all the sillyness we used to do with script recursions is now overkill. I hope sincerly that it's use, is to recreate a stored request, otherwise would it be a slight violation of the relational approach, having the same data in more than one place defeats the object of relational structure. --sd
Slobey Posted September 3, 2005 Author Posted September 3, 2005 Thanks guys, The script is to convert a number of nutrient values for a specified quantity. Each field is multiplied by the same calc amount. Get(active fieldname) works great. It's amazing how we forget, I have used it in the past and just got a brain block. I am using script variables instead of globals, yee ha for them. Thanks again
Recommended Posts
This topic is 7023 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now