Newbies jgreen Posted February 5, 2002 Newbies Posted February 5, 2002 I have a layout with 200 buttons numbered 1 thru 200. I want filemaker to make a new record each time I click a button with the number of that button. For instance, if I click on button 120 it will make a record with 120 in it. After I'm done, it will tally the top ten buttons clicked. It is used for a contest and using buttons is much easier than hand typing each number voted on. However, there has to be an easier way than to make a script for each button. I tried status (currentfieldname), but then I have to make 200 fields. I even tried to do a field serialized. I'm pulling my hair out. I did see a post once on how to do a "text on button" script but can't find it now. Otherwise this script works fine. ----for each button ---- New Record/Request Insert Text[select,"vote",100"] Refresh Window[] ------------------------- As is now, everything works like I want, I just don't want to do a script for each button [ February 05, 2002, 12:15 PM: Message edited by: jgreen ]
Thom Posted February 5, 2002 Posted February 5, 2002 You could use some portals and reduce the number of scripts to one per portal. Another approach is easier to setup, requires one script, and two clicks per number.
Korky Posted February 6, 2002 Posted February 6, 2002 May I suggest that you look at the Help topic Status Functions and especially Status(Current Field Contents). This works across different files so that the value of a field you have clicked into can be carried across to a field in another file. Say you have 200 number fields containing the values 1-200, if you click into any of these, then run a Perform external script step, the value therein will be contained in the function Status(CurrentFieldContents)in the external script. So,you will have only two scripts; one external script and one to 'Perform External Script' The value carried over will vary according to which of the number fields is active. Actually buttoning the scripts could be a bit tricky but I think it can be done.
Korky Posted February 6, 2002 Posted February 6, 2002 May I suggest that you look at the Help topic Status Functions and especially Status(Current Field Contents). This works across different files so that the value of a field you have clicked into can be carried across to a field in another file. Say you have 200 number fields containing the values 1-200, if you click into any of these, then run a Perform external script step, the value therein will be contained in the function Status(CurrentFieldContents)in the external script. So,you will have only two scripts; one external script and one to 'Perform External Script' The value carried over will vary according to which of the number fields is active. Actually buttoning the scripts could be a bit tricky but I think it can be done.
Recommended Posts
This topic is 8397 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