tomp Posted August 21, 2007 Posted August 21, 2007 Not sure if this is the right forum, but here goes.... My layout displays a map. The map may contain 100 or more points of interest. For each point of interest, 2 pieces of information are displayed: a container field with varying colors and another with a number field. The values for those fields depend upon a common date and data related to the particular point of interest. So for each point of interest there are 3 fields, 2 relationships, and a script that defines the action taken when the point of interest is clicked on. Additionally there is a 'set field' statement for each of the displayed fields that is executed when the date is changed. I can think of no way to design the database besides defining 100+ container fields and 100+ number fields and 100+ 'point of interest' fields and 200+ relations from the 'point of interest' fields to the related data and and 200+ 'set field' statements to recalculate the displayed fields when the date is changed and 100+ scripts assigned to each of the points of interest to take action based upon the data associated with each point. I don't think I can use repeated fields since I don't know how to display just the 23rd of 100 container values on the 23rd point of interest, nor do I know how to define a relation using the 23rd value of a repeated field for the 'from' or 'to' table. I don't think I can use a single script with the 'get(scriptparameter)' option because I don't know how to 'set field(get(scriptparameter),value)' which is a necessary step in the script. If this makes any sense, does anyone know of a way to avoid having all those fields, relations, and scripts? I've defined the 1st 30 points of interest with all associated fields, relations, and scripts and don't know if I have the patience to do it as much as 100 more times. TIA
MarkWilson Posted August 22, 2007 Posted August 22, 2007 tomp, This task could be a little easier with a upgraded version as there are some new tools. You can now specify the starting and ending repetitions for repeating fields. Objects can be named and you can specify a Go To Object script step. In the mean time, you can find the field more dynamically with this link. This was originally from FMP 5.5. You will need to use Set Field with no location specified instead of Paste. Could this not set a couple of key fields at the same time for your relationship which would allow only one set of relationships to be setup.
mr_vodka Posted August 22, 2007 Posted August 22, 2007 you can set the Parameter by entering in a value in the box when you are assigning your button a script. There is an area at the bottom of the popup for Optional Parameter. Once you assign it, you an retrieve its value in script with Get (ScriptParameter). For the rest of your question, I am more than sure it can be done with a lot less relationships and field. However, I am confused about this. For each point of interest, 2 pieces of information are displayed: a container field with varying colors and another with a number field. The values for those fields depend upon a common date and data related to the particular point of interest. Do you think you can post a copy of your file.
Recommended Posts
This topic is 6303 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