kenneth2k1 Posted January 7, 2003 Posted January 7, 2003 OK, without going into a lengthy explanation, I have a field which is formatted as a checkbox. I am going to place a button over each value list item that will enter that value into the field. That way the checkbox shows up next to that value. I am doing this to have a scriopt perform for each checkmark. I thought I was really spiffy, then I realized that I could mark a checkbox, but how do I un-mark a checkbox? I though about clear, but if there are other values, I dont want those cleared, just the one value. I hope it makes sense. If you need more info, let me know. Thanks for the help. Ken
slstrother Posted January 7, 2003 Posted January 7, 2003 Try this If["Patterncount(Checkbox,"YourValue")=0"] Set Field["Checkbox","Checkbox&"
kenneth2k1 Posted January 7, 2003 Author Posted January 7, 2003 AAH, Substitute, yes, that's it! I've used it a hundred times in calc fields, I didnt think of scripts! Thanks! Ken
kenneth2k1 Posted January 7, 2003 Author Posted January 7, 2003 I changed it slightly because of the nature of the Set Field [ ] command. It will select the entire contents and thus clear any other info in the field. However, if the field is already selected, or entered and the script is run, it will work. So I changed it to Insert Calculated Result [ ] and unchecked Select Entire Contents. Seems to work more consistently. Thanks again. Ken
slstrother Posted January 7, 2003 Posted January 7, 2003 No problem, thanks for the info on the modification to the script. Steve
BobWeaver Posted January 8, 2003 Posted January 8, 2003 Steve's original method should work because it appends the value to the existing checkbox contents. It doesn't overwrite. Using the insert calculated result command is kind of flaky because it can fail if you have the "allow entry to field" de-selected.
Recommended Posts
This topic is 7994 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