Another_Karen Posted November 26, 2003 Posted November 26, 2003 Help! I can't figure out how to 1)check a check box and 2)change a value in a radio button field, using script steps. Thanks.
-Queue- Posted November 26, 2003 Posted November 26, 2003 Set Field ["yourfield", 1] for a field formatted as a checkbox. Set Field ["yourfield", "yourvalue"] for a field formatted as radio buttons.
John Caballero Posted November 26, 2003 Posted November 26, 2003 You use the Set Field script step to set whatever value(s) you want. If you have a "Yes No" radio button and you want to set it to "yes", you just use the Set Field script step to set the field to "yes". It's very similar for check boxes, but often check boxes contain multiple values ("NY", "CA", "TX", "WY", for example). To set multiple values, you'd still use the Set Field script step, but you'd insert the carriage return symbol
Another_Karen Posted November 26, 2003 Author Posted November 26, 2003 I'm chagrined to say that I can't do this. I've tried Set Field several times (even before my first post) and I can't figure out how to tell it what value to assign to the field. The closest I can get is to the calculation screen, but it won't accept anything I've entered there.
Another_Karen Posted November 26, 2003 Author Posted November 26, 2003 Never mind...I figured it out. My values for these fields were not numbers, they were text. Apparently there is no way to do this unless your choice of values is numerical, so I changed them so this will work. Thanks!!
John Caballero Posted November 26, 2003 Posted November 26, 2003 When you select the Set Field script step, you're first asked to specify which field you want to set the value into. You should see a list of all the defined fields in your file. Scroll through the list until you find the field you want to set and double-click it. Then you're presented with a screen that allows you to specify what the contents should be. Yeah, it's basically the calculation screen. For literal text, just enclose it in quotes. You can get fancy and do all sorts of complex calcuations, referencing the values in other fields and other files, for example, but from your orginal post it seemed like you were after pretty specific information.
John Caballero Posted November 26, 2003 Posted November 26, 2003 You can set any type of data into a field provided the data you're setting matches the field type of the field your setting into. In other words, text, time, data, numbers, etc., can all be used with Set Field, but you'll obviously get some strange results if you set time data into a date field, for example.
Vaughan Posted November 27, 2003 Posted November 27, 2003 Filemaker Pro interprets anything typed into the calculation as either a function name or a field name, or a number (if it's a string of digits). Text must be put inside quotes to be interpreted as literal text.
Recommended Posts
This topic is 8014 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