I wish I knew a bit more about what final goal was - maybe I'm just curious.
Looking at the script, it looks like there is a checkbox field in the "letters" table. For that checkbox field - it needs to be based on a value list, for display purposes. I think that the value list should be simply one value "Yes". The checkbox fields should be defined on the layout as using this value list.
However, looking at the layout you provided, I don't know how you got checkboxes for each letter, coming from different records.
The reason I have it set up the way I do is that I use the checkboxes to compile the amount of letters and sounds each child knows. I Then can take that and view as list with each child's name on it to analyze who needs extra help.
For years I have manually checked each box as the children are tested and I am trying to stream line this process. I would also like to have the children use the scan gun and help with entering different things. The child will be asked the letter and if they say the correct name they get to scan that barcode. I am utilizing barcodes for a variety of things to allow the children to be more involved with data collection. I already have them scanning in for attendance which they love. I will be starting to have them scan when I work in groups to keep anecdotal records.....
were you able to check those conditions? I wasn't terribly clear. Here are some screenshots:
This will show a checked box when the value in your LetterCheckbox field is "Yes" (as it is set in your script), and unchecked for anything else. For all this to work, the LetterCheckbox field should be defined as a text field.
you seem to describe a single field with multiple checkboxes as well as multiple records with single value check boxes. So I can't tell exactly how you have set this up.
A separate record would make gathering statistics easier.
You also have set field steps with no second parameter so it would appear these steps don't actually do anything.
But a common issue with multiple value checkboxes is how to add a selected value without losing previous selections. If that's your problem, the following set field step can work:
set field [ checkboxfieldhere ; list ( checkboxfieldhere ; newvaluehere) ]
Thanks so much for responding. I can get this checkbox to fill with the above script based on a barcode. This is one layout of many. This layout has 4 fields with one as a checkbox. Each of the letters are individual records .... The first record has this info in the fields ID field says 3 number says 12001(this is my barcode number) description says b sound. However the checkbox is not truly associated with the b sound record. If I take that field and place it on another layout say the one above with "b" checkbox and then the letter b underneath there is no association. This one is useless to me. A lot of what I make is trial and error so I will end up with a ton of layouts I will never use. I eventually delete them.
The one I can't figure out is the layout the has 78 checkbox fields each which represent one checkbox for each capital letter one checkbox for each lowercase letter and one checkbox for each sound. The records are associated to children in my classroom. So when I look at a record the child's name is at the top and several tabs that store data on that child. So when I see the child's record I can tell how many letters they know by the visual of checkboxes field. I also use these fields to calculate the number of letters they know. It seemed so easy when I thought "oh yeah scan a barcode and bang the checkbox on that layout tab would fill in" Nope Now I am look at searching a list of fields on that layout and see if I can use that as a work around.
Thanks for responding. Let me see if i can explain better. It is multiple fields with only one value "yes" meaning the box is checked. The below screenshot shows how this particular layout is viewed in browse mode. Each record is associated with one Student in my classroom. I have several tabs that I can click on and see any data I have on that Student.
As you can see this view shows that first tab tier "testing" is selected and the second tier tab "alphabet" is selected. On this tab I have 78 + fields each represent one checkbox for each capital letter one checkbox for each lowercase letter and one checkbox for each sound. This is how the fieldnames go Capital letter = "A" lowercase letter = "a1" and Letter sound = "a sound". There are three different fields for each letter. So when I see the child's record I can tell how many letters they know by the visual of checkboxes field. I also use these fields to calculate the number of letters they know. It seemed so easy when I thought "oh yeah scan a barcode and bang the checkbox on that layout tab would fill in" Nope Now I am look at searching a list of fields on that layout and see if I can use that as a workaround.
Thanks for taking the time.
I struggle with what the architecture might be here.
However, given the Alphabet tab, I now believe that there needs to be four fields for display: Sounds, UC, LC, Blends.
These should be text fields. On the layout, each field should occupy the obvious four spaces. There should be four matching custom value lists, each 26 lines long. These four fields should be defined on the layout as checkbox sets, each pointing to their appropriate value list.
Now, as you add each new letter to these text fields, follow it by a carriage return. This will create a list of letters. FileMaker will check any box that is on that list.
You would replace the line in your script that set the value "Yes" with this. (Here, the field LetterCheckbox should be called say, List_LowerCase.)
There are text functions that will allow you to remove bits from the lists. (Note that this "list<->checkbox" thing FM does is not case sensitive; but that shouldn't affect this.)
I will try tomorrow.