List with Check box

Tagged: 

Viewing 9 reply threads
  • Author
    Posts
  • January 12, 2023 at 11:45 AM #48613

    Glen Forister
    Participant

    I want to show in list view (all records listed on the left of iPhone screen) a check box on the right that I can check or uncheck without having to go into that record to check the box.

    The heading for that check field is listed at the top, but no boxes underneath unless I enter that record.

    Is this possible?

    January 12, 2023 at 8:51 PM #48629

    Brendan
    Keymaster

    Hi Glen,

    If you drag your Checkmark field up to the very first field in your form, then Tap Forms for iOS will put a live check button on the left side of the record. Then you can tap on that and not have to go directly into the record.

    Thanks,

    Brendan

    January 12, 2023 at 10:51 PM #48632

    Glen Forister
    Participant

    That works, thanks. Didn’t see this anywhere.

    January 13, 2023 at 6:07 PM #48635

    Brendan
    Keymaster

    Ya, it’s kind of one of those hidden features. The same goes for a Photo field. If it’s the first field in your list of fields, then a thumbnail will be created and displayed on the left.

    January 16, 2023 at 3:41 PM #48678

    Glen Forister
    Participant

    Unfortunately, I have a form with checkmarks for 3 categories of items and a description of the item. In my old database I could check filter for a category if I wanted to (grouping them). Then the 1st checkbox was for when I had secured the item when I would check the item off the list.
    In Tap Forms I put the first checkbox on the top (iphone on left of table view).

    When I do this, I can’t check any of the items unless I go into that record.
    That is very distracting while searching for items to obtain and a waste of time.

    Also, about checkboxes there is something you really need that I can’t find. When I am finished with my operation of finding the things in the list (those all have the “get FIELD” checkbox checked which can be a lot of checks. When I remove the filter to bring all those items back from that FIELD onto the viewable form they are all visible. You need (if you don’t have) a way to select a FIELD of checkboxes and remove all the checks, or add all the checks depending.

    In fact, it would be useful for many FIELD types (text, checkbox, number) to be able to replace all the items in that FIELD to something else.

    January 18, 2023 at 9:09 PM #48703

    Brendan
    Keymaster

    In Tap Forms for Mac there’s a Find & Replace function which can do this sort of operation.

    For iOS you’d need to write a script that loops through all your records and resets the Checkmark fields to 0 (off) if you wanted to quickly start again.

    January 18, 2023 at 10:10 PM #48709

    Glen Forister
    Participant

    That sounds good.
    1. Where is that find and replace? I tried the Edit/Find & Replace in the menu, but all I could find was the “Find” in the upper right corner, no replace. Or, do you have a library of scripts that I can find that in? “check mark” = 0 & 1. I get that.

    2. When I’m in the filed, I will definitely need a script. Is that in this library of scripts?
    Thanks.

    I didn’t see where on the iPhone I would find that script. I didn’t see it in the “Tools”.

    • This reply was modified 1 year, 11 months ago by Glen Forister.
    January 18, 2023 at 10:46 PM #48715

    Brendan
    Keymaster

    The Advanced Find & Replace function is under the Records menu on the Mac version.

    There’s a script snippet called Basic Loop which just sets up a loop. But you would have to fetch the records first with var records = form.getRecords(); and then get each record within the loop and then set the value of the field using the record.setFieldValue(some_checkmark_field_id, 0); function. The 0 would set the checkmark field value back to off.

    Don’t forget to do a form.saveAllChanges(); outside of the loop at the end before the program ends so Tap Forms can save the values.

    This Form Script will reset all the checkmark fields for your Shield field back to OFF:

    function Reset_Shields() {
    
    	var shield_id = 'fld-d13c2bafe6e8482288c551bd8c931373';
    	var records = form.getRecords();
    	
    	for (var index = 0, count = records.length; index < count; index++){
    		var theRec = records[index];
    		theRec.setFieldValue(shield_id, 0);
    	}
    	form.saveAllChanges();
    }
    
    Reset_Shields();
    January 19, 2023 at 10:48 AM #48724

    Glen Forister
    Participant

    I thought I had failed to make it work, but then I remembered you said that was for the iPhone, so tried it there and it did work.
    Thanks.

    Seems like I have to install that script to every FORM which isn’t ideal, but will work.

    • This reply was modified 1 year, 11 months ago by Glen Forister.
    Attachments:
    You must be logged in to view attached files.
    January 19, 2023 at 8:17 PM #48735

    Brendan
    Keymaster

    Well the script is specific to the form because it’s referencing fields within the specific form. So ya, you need it in every form if you want the same behaviour in every form. Alternatively, a more advanced script could loop through all records of every form and look for specific fields to update to reset the checkmark field values.

Viewing 9 reply threads

You must be logged in to reply to this topic.