Tap Forms Database Pro for Mac, iPhone, iPad and Apple Watch › Forums › Using Tap Forms 5 › Adv Find & Replace not working
- This topic has 5 replies, 3 voices, and was last updated 2 weeks, 1 day ago by
Brendan.
-
AuthorPosts
-
December 11, 2020 at 7:22 PM #42830
Chris KleinParticipantI 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 0None of them turn the checkbox fields from checked to unchecked.
Any suggestions?
December 13, 2020 at 9:10 PM #42842
BrendanKeymasterHi 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
December 13, 2020 at 9:11 PM #42843
BrendanKeymasterOh, and internally a Checkmark field uses 0 or 1. But initially they are empty, so they have no value (aka null).
December 18, 2020 at 10:20 PM #42902
Chris KleinParticipantThanks Brendan! Works perfectly!
August 29, 2026 at 3:19 PM #54502
Ray KlossParticipantDid you fix the checkmark replacement problem? It is still crashing the program for me with the current Mac version. In the fields for Find and Replace, what should I put in the fields to remove a checkmark?
August 29, 2026 at 5:40 PM #54503
BrendanKeymasterHi Ray,
When you say the current Mac version, are you referring to Tap Forms Pro?
Put 0 in the value field to remove a checkmark.
Thanks,
Brendan
-
AuthorPosts
You must be logged in to reply to this topic.