April 17, 200916 yr Hi I would be grateful if you could help me out here. I guess this must be simple but I cannot get around it! How could I create a script to go a record according to the value in a field? I would like to be able to move through different layouts, based on value c or value z. So if in field 'type' the value is 'z' I would like to go to layout 2. Otherwise to go to layout 3. Many thanks! Edited April 17, 200916 yr by Guest
April 17, 200916 yr Check out the Go to Related Records script step. Also, take apart some of the sample files that come with FM to see how to build relationships.
April 17, 200916 yr Author Thanks for your reply. I know how to build relationships, my problem is that I want to make a calculation for a script that will choose the correct layout based on a value I have given (with another script) in another field. I have a table with 47 fields, for two different types of objects. I would like to be able to find records from only one type of objects automatically that in field 'x' have the value 'c'.
April 17, 200916 yr The most straightforward way is a script like this: If( type = "z") Go to layout(2) Else Go to layout(3) End If If you're using FM8 as indicated in your profile, you'll have to click a button or select the script from the scripts menu to run the script, or use a plugin such as zippScript if you want to automatically change layouts. In FM10 you can make field data changes trigger scripts without a plugin.
April 17, 200916 yr Hi Tom, ...Snip... use a plugin such as zippScript ... snip zippScript is no longer available. Lee
Create an account or sign in to comment