Discussions

 View Only
  • 1.  A formula URL Button to check a box and Update a Date Field

    Posted 09-04-2018 10:00
    Hi,

    I am creating an application to track the progress of a customers onboarding. At the bottom of my form I have a button to check a box and mark the customer as successful or unsuccessfully onboarded. I have a Form rule set up so that when the checkbox is ticked - it updates a hidden date field, allowing me to calculate how long the process has taken.

    I noticed when I check the box by clicking it, this works seamlessly, however when I check the box by clicking the button - the form rule does not seem to work and the date field does not update.

    The end users will not see the checkbox, only the button.
    Is there a way around this - potentially building in a function to the button that will update the date field with the current date?

    Thanks for your help!


    Current Button Formula:
    If([Unsuccessful Onboarding Checkbox] = false,
        URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
        "&rid=" & [Record ID#] &
        "&apptoken=65m6uecaabu4w5qz7dbnim3jy" &
        "&_fid_72=1" &
        "&rdr=" &
        URLEncode(URLRoot() & "db/" & Dbid() &
            "?a=er&rid=" & [Record ID#]),

        URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
        "&rid=" & [Record ID#] &
        "&apptoken=65m6uecaabu4w5qz7dbnim3jy" &
        "&_fid_72=0" &
        "&rdr=" &
        URLEncode(URLRoot() & "db/" & Dbid() &
            "?a=er&rid=" & [Record ID#]))


  • 2.  RE: A formula URL Button to check a box and Update a Date Field

    Posted 09-04-2018 13:30
    Hello Ryan, 
    Because you are using an api call to check the box, it will not trigger the condition for the form rule that is set to "when the condition becomes true". I am not recommending that you uncheck that setting. Lets modify the button. Replace ### with the field ID of the Date field.  This should set the date of Today in the date field. 

    URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
        "&rid=" & [Record ID#] &
        "&apptoken=65m6uecaabu4w5qz7dbnim3jy" &
        "&_fid_72=1" &
        "&_fid_###=" & Today() &
        "&rdr=" &
        URLEncode(URLRoot() & "db/" & Dbid() &
            "?a=er&rid=" & [Record ID#]),

    Let me know if this helps.



  • 3.  RE: A formula URL Button to check a box and Update a Date Field

    Posted 09-04-2018 14:01
    Hey,

    This has worked perfectly - just what I needed!
    Thanks for your help!