Forum Discussion

Wallace__DHS_Ye's avatar
Wallace__DHS_Ye
Qrew Trainee
4 years ago

How to add to my url formula button that changes a checkbox to ""true"

I am trying to create a url button that will take a user to the related form and check off a checkbox. My current formula is not working for some reason:

I am in the Jobs table (_DBID_JOBS) when I select the button, the checkbox I am trying to change is also located in the Jobs table. Once the user selects the button (They will be selecting from a report) I would like them taken to the related jobs form and would like the field ID 1146 to change to "checked". 

URLRoot() & "db/" & [_DBID_JOBS] & "?a=dr&rid=" & [Maximum Related Job] & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Maximum Related Job] &"apptoken=b5migf_nhwb_uwejxvbfjbg42bcg4aecdf5rk4b"
&"&_fid_1146=1"

------------------------------
Wallace (DHS)
------------------------------

13 Replies

  • Flip around the display record.  You do not display it first, the API can edit the record and you can display it after

    rewrite the formula completing your api edit record first.  After that put an & next line should be
    "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_JOBS] & "?a=dr&rid=" & [Maximum Related Job]);

    You complete the action and use the rdr to navigate after that.

    ------------------------------
    Ivan Weiss
    ------------------------------
    • WallaceYeboah's avatar
      WallaceYeboah
      Qrew Member
      Thanks for the response Ivan. The formula still seems to not be working

      Here is the updated formula:

      URLRoot() & "db/" & "db/" & Dbid() & "?a=API_EditRecord" & "&_fid_1146=1" & "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_JOBS] & "?a=dr&rid=" & [Maximum Related Job])

      I get this error when I test

      <qdbapi>
      <action>API_EditRecord</action>
      <errcode>102</errcode>
      <errtext>
      Invalid request - we cannot understand the URL you specified.
      </errtext>
      </qdbapi>


      ------------------------------
      Wallace Yeboah
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        The first line of the formula is missing telling the AP:I which record to edit.  Perhaps you want this

        URLRoot() & "db/" & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] 
        & "&_fid_1146=1"
        & "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_JOBS] & "?a=dr&rid=" & [Maximum Related Job])



        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------