![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
So how do I get this checkbox to have only values of 1 or 0 when I check and uncheck it? I added a data validation to the field so that it only allows values from a value of 1 and 0. It validates always, and never allows overrides. However, the field still goes to blank when I uncheck the checkbox. |
#3
| |||
| |||
|
|
Hello all - I'm having problems with a database project that I inherited. We have a series of checkboxes that are used in if statements to print different layouts. The behavior of one particular checkbox is a problem. The script originally checked " if field = 1 " and then ran the script or not. I added an edit box to see the actual value of the checkbox field. It varies between 1,0, blank, and '?'. The last value I found out by doing a message window with the field's value, and it says: [ Checkbox field value ] 1 0 -------------------------------- So how do I get this checkbox to have only values of 1 or 0 when I check and uncheck it? I added a data validation to the field so that it only allows values from a value of 1 and 0. It validates always, and never allows overrides. However, the field still goes to blank when I uncheck the checkbox. Should I put an invisible button over it to control the value of the field? |
#4
| |||
| |||
|
|
Hello all - I'm having problems with a database project that I inherited. We have a series of checkboxes that are used in if statements to print different layouts. The behavior of one particular checkbox is a problem. The script originally checked " if field = 1 " and then ran the script or not. I added an edit box to see the actual value of the checkbox field. It varies between 1,0, blank, and '?'. The last value I found out by doing a message window with the field's value, and it says: [ Checkbox field value ] 1 0 -------------------------------- So how do I get this checkbox to have only values of 1 or 0 when I check and uncheck it? I added a data validation to the field so that it only allows values from a value of 1 and 0. It validates always, and never allows overrides. However, the field still goes to blank when I uncheck the checkbox. Should I put an invisible button over it to control the value of the field? |
#5
| |||
| |||
|
|
[ Checkbox field value ] 1 0 |
#6
| |||||||||||
| |||||||||||
|
|
In article <1181765467.420681.66... (AT) x35g2000prf (DOT) googlegroups.com>, lawp... (AT) gmail (DOT) com wrote: Hello all - I'm having problems with a database project that I inherited. We have a series of checkboxes that are used in if statements to print different layouts. The behavior of one particular checkbox is a problem. The script originally checked " if field = 1 " and then ran the script or not. I added an edit box to see the actual value of the checkbox field. It varies between 1,0, blank, and '?'. The last value I found out by doing a message window with the field's value, and it says: [ Checkbox field value ] 1 0 -------------------------------- So how do I get this checkbox to have only values of 1 or 0 when I check and uncheck it? I added a data validation to the field so that it only allows values from a value of 1 and 0. It validates always, and never allows overrides. However, the field still goes to blank when I uncheck the checkbox. Should I put an invisible button over it to control the value of the field? Checkboxes for each value are either On or Off. If you turn off all the checkboxes in a field, then the field is empty. Unless the "?" data is an actual "?" that has been typed into the field (or set by a script), then the "?" symbol may mean the field isn't wide enough to display the data. Try stretching the "edit box" version of the field to be longer. |
|
By the sound of it, when the "1" value was On the script would run and when the "1" value was Off the script isn't run. The "0" value isn't actually needed, but the original developer may simply have reused an existing Value List for this second purpose. Such a system would work fine until someone starts playing where they shouldn't - you should not really play with a system you don't understand, whether it's the computer's operating system or a FileMaker solution that works. |
|
Normally a field used to define which layouts to print would be a Global field, but since you say it contains various data it must be a normal field (different data for each record). |
|
I'm not quite sure what you're wanting to do or what you should do (if anything). |
|
If the field is designed to be "1" or "empty" then you shouldn't really be changing it to set it to "0", but the field currently contains various values caused by someone playing at some stage. |
|
You should probably get the original person back to fix the problem since they should know how it's meant to work. |
|
It's impossible to know whether you should actually be playing with those values at all, but if you want the field to be set to "1" for ALL records (or all records in the current Found Set), then: |
|
- Make a backup of the file and then re-open it in FileMaker - Find the appropriate records (Show All or Find a particular set) |
|
- In the "Edit Box" version of the field type a 1 - Choose Replace from the Records menu - Make sure in the window that appears it says you are replacing the contents of the appropriate field with "1" and then click Replace - All done. You can use the same process to set the field to be "empty" for all fields, by simply deleting any data in the "edit box" version of the field. Or you can use the same process to set them all to "0". By resetting the values you'll get rid of the strange "?" data ... although it may well be there for a good reason elsewhere within the system. |
|
If after resetting the values (to "1" or "0") you really want to limit the values to either "1" or "0", and not "empty", then you can change the field's format options to use Radio Buttons rather than Check boxes ... but the field sounds like it's meant to be "1" or "empty". |
|
Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o) |
#7
| |||
| |||
|
|
On Jun 13, 4:11 pm, lawp... (AT) gmail (DOT) com wrote: [ Checkbox field value ] 1 0 If the value of the checkbox field is "1" followed by a carriage return, then a "0" as you seem to indicate, it would mean that both the "1" checkbox and the "0" checkbox were checked, which is normal checkbox behavior. Multiple checked items appear on their own lines with checkboxes. |
|
The safe way to get the value of a checkbox that might possibly contain multiple values is to use the Patterncount function to look for your "1". |
#8
| |||
| |||
|
|
OK, I stretched out both the checkbox and the edit box for the field. It turns out that the checkbox has actually two checkboxes, one on top of the other. Same deal with the edit box -- one value on top of the other. And they can hold the values 1,0, or blank. I can't figure out what the pattern is between the checkbox being checked or not and the value of the edit box being 1,0 or blank. Is this a repeating field? |
|
This should be so simple, I can't understand why I need to bring in someone else. I mean, this should just be a binary field. It's either true or false, 1 or 0, red or green, chocolate or vanilla. If I can't figure it out, I don't see why the original developer would be able to. |
|
So in Filemaker, a checkbox sets a field to "1" or empty, rather and "1" and "0". |
#9
| |||
| |||
|
|
I think I'm beginning to understand. In Filemaker, a checkbox is not a single check box, but actually two checkboxes? So there can be four values of a field with a checkbox? [ ] [ ] = blank [X] [ ] = ? in a small field or 1 <cr> 0 [ ] [X] = ? in a small field or 0 <cr> 1 [X] [X] = 1 |
|
The safe way to get the value of a checkbox that might possibly contain multiple values is to use the Patterncount function to look for your "1". I've been playing around with the checkboxes, and I can't seem to get rid of the '1's in the edit field by unchecking the boxes. Are you sure the Patterncount function will work in all situations? |
#10
| |||
| |||
|
|
On Jun 14, 9:49 am, Paul Bruneau <p... (AT) ethicalpaul (DOT) com> wrote: On Jun 13, 4:11 pm, lawp... (AT) gmail (DOT) com wrote: [ Checkbox field value ] 1 0 If the value of the checkbox field is "1" followed by a carriage return, then a "0" as you seem to indicate, it would mean that both the "1" checkbox and the "0" checkbox were checked, which is normal checkbox behavior. Multiple checked items appear on their own lines with checkboxes. I think I'm beginning to understand. In Filemaker, a checkbox is not a single check box, but actually two checkboxes? So there can be four values of a field with a checkbox? [ ] [ ] = blank [X] [ ] = ? in a small field or 1 <cr> 0 [ ] [X] = ? in a small field or 0 <cr> 1 [X] [X] = 1 |
![]() |
| Thread Tools | |
| Display Modes | |
| |