johnrh Posted December 13, 2002 Posted December 13, 2002 Is it possible within a filemaker script to do the following. I want to loop through a set of records for each record set a variable equal to the value of a particular field for each record So that afterwards I will have a set of say 10 variables (if there are 10 records in the found set) each one matching a value in a particular record Say for example Var1 = Feild Value from record1 Var2 = Field value from record 2 etc... In other places I would use a combination of for...next loops but how to go about it in Filemaker? Thanks John
Newbies Aeolia Posted December 13, 2002 Newbies Posted December 13, 2002 Use a loop, and then a global field (for an array), a series of global fields (for storing independent variables) or a related file to store the values. The your script can run: Go to Record/Request/Page [First] Set Field [gVariableArray, ""] Loop Set Field [gVariableArray, gVariableArray & "|" & YourFieldValue] Go to Record/Request/Page [Exit after last, Next] End Loop THis will get the delimited array of variables from the current found set into the gVariableArray text field.
johnrh Posted December 13, 2002 Author Posted December 13, 2002 Thanks for that. The only other step I need is how to get this array back out into individual fields
Korky Posted December 13, 2002 Posted December 13, 2002 I suspect that the answer to your problem is extremely simple. It's the question I can't understand. You seem to be saying that you want to go to each record in turn, grab a value from a particular field, then place that value in another field. This doesn't make sense. Can you explain a bit more please.
Recommended Posts
This topic is 8020 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