Forum Discussion

NOELHODGES's avatar
NOELHODGES
Qrew Cadet
4 years ago

How to check a check box by clicking a button

Hello!,

I am trying to make a formula to check my checkbox when a user pushes a button. I am not very good w button formulas and am wondering if you all had any pointers.

Best,

Noel

------------------------------
NOEL HODGES
------------------------------
  • Search the apps for one called 'Magic Buttons' from Kirk Trachy. All kinds of great examples in there, including exactly this. This is the code for checking and unchecking a box, then displaying the record.

    If([Checkbox Field] = false, URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
        "&rid=" & [Record ID#] &
        "&apptoken=xxxxxxxxxxxxxxxxxxxxxx" &
        "&_fid_59=1" & //this is the checkbox field
        "&rdr=" &
        URLEncode(URLRoot() & "db/" & Dbid() &
            "?a=dr&rid=" & [Record ID#]),

        URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
        "&rid=" & [Record ID#] &
        "&apptoken=xxxxxxxxxxxxxxxxxxxxxxxxxx" &
        "&_fid_59=0" & //this is the checkbox field
        "&rdr=" &
        URLEncode(URLRoot() & "db/" & Dbid() &
            "?a=dr&rid=" & [Record ID#]))

    // Press the button and this changes the "Checkbox" to checked and returns to display record mode
    // Press it again and this changes the "Checkbox" to unchecked and returns to display record mode


    ------------------------------
    Mike Tamoush
    ------------------------------