I have a checkbox field called Tonight! in my astronomy form.
If I want to view this object tonight, I’ll check the box on so that all objects with a check will show up in a list I’ll use tonight with my telescope.
Tomorrow, however, I want to use Advanced Find and Replace to uncheck all the Tonight! boxes so I can make a new observing list.
The Advanced Find & Replace doesn’t seem to work on the checkbox.
I’ve tried these combos:
Yes No
True False
1 0
None of them turn the checkbox fields from checked to unchecked.
Any suggestions?
Hi Chris,
You’re right. It’s not working right for checkmark field types. I’m working on fixing that. In fact, I just fixed it (for the next update).
In the meantime, you can write a Form Script to accomplish the same thing that loops through the records, looking for the checkmark field value and turning it off if it’s on.
Are you familiar with scripts in Tap Forms yet? Here’s a sample bit of code that will do that for you, but you’d have to put your own Checkmark field’s ID in it:
function Toggle_Checkmark() {
var records = form.getRecords();
var check_mark_id = 'fld-f14ccd51913b4348b2c32d9ac4eaf7f2';
for (var index = 0, count = records.length; index < count; index++){
// do something;
var record = records[index];
var value = record.getFieldValue(check_mark_id);
if (value == true) {
record.setFieldValue(check_mark_id, 0);
}
}
form.saveAllChanges();
}
Toggle_Checkmark();
Thanks,
Brendan
Oh, and internally a Checkmark field uses 0 or 1. But initially they are empty, so they have no value (aka null).
Thanks Brendan! Works perfectly!