January 28, 200422 yr Newbies Very new to FM and the whole scripting process. Is it possible to create a script that will create a list based upon the status of a radio buttons value list. I am trying to track a database based upon a job being open or closed. I will create two buttons, one to view open jobs, one to view closed jobs and one to view all jobs. The way I have it set up so far is a radio button field named "JobStatus" using a value list named "Status". Status only has an "Open" or "Closed" state with the initial state set to "Open" when a new record is created. Any help would be greatly appreciated. I have been going through quite a series of system beeps trying to figure this out. Thanks, Jay
January 28, 200422 yr isn't it funny, I did a similar system just minutes ago. You need a global field to hold the users selection, format it as check boxes based on a value list, make the values "open" and "closed". I call the global field gSelection. Make a script to generate the list. The script needs a conditional IF statement to work out what records to find, or put another way, what find to perform. Make a script that performs the find for open record: call it "Find Open Records" and another to find closed records. Now to the logic... if the user selects both open and closed check boxes the gSelect field will have one
January 28, 200422 yr Author Newbies Thanks for the quick response. So is there no way to do this with radio buttons? Thanks, Jay
January 29, 200422 yr Not sure what you mean. The gSelect field has check boxes that let the user select whether to find open or closed records (or both if both are checked). This could be changed into radio buttons if desires i guess, but you'd need three (open, closed, all) and I liked the check box interface better. If you're asking whether you need a script to do it, the answer is yes. It's a complicated process.
January 29, 200422 yr I have completed the same process numerous times without it being a global field. Just have your script perform a find on Status = Open and click restore. Then create the same script except for Status - Closed. Then label your buttons appropriately.
January 30, 200422 yr Author Newbies I hate to ask, but could you write out the script so I can follow. This is driving me nuts and I have spent way too much time trying to figure this out. Anything would be gtreat. Thanks, Jay
January 30, 200422 yr "I will create two buttons, one to view open jobs, one to view closed jobs and one to view all jobs." From this I assumed you wanted to perform finds to display open, closed, or all records, not just sort the list. If that's what you want then the process I outlined will work. If you just want to sort the records, the process is much simpler. Use the Sort command to sort the records. Then define a script with the Sort [restore, no dialog] script step in it (a one-line script is all that's required). The "restore" option makes the script save the sort order and restore it each time the script runs.
Create an account or sign in to comment