Discussions

Expand all | Collapse all

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

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

    Posted 23 days ago
    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)
    ------------------------------


  • 2.  RE: How to add to my url formula button that changes a checkbox to ""true"

    Posted 22 days ago
    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
    ------------------------------



  • 3.  RE: How to add to my url formula button that changes a checkbox to ""true"

    Posted 22 days ago
    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
    ------------------------------



  • 4.  RE: How to add to my url formula button that changes a checkbox to ""true"

    Posted 22 days ago
    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
    ------------------------------



  • 5.  RE: How to add to my url formula button that changes a checkbox to ""true"

    Posted 22 days ago
    Thanks Mark. I just tried that formula, still no luck. I keep receiving the same error message when I test

    ------------------------------
    Wallace Yeboah
    ------------------------------



  • 6.  RE: How to add to my url formula button that changes a checkbox to ""true"

    Posted 22 days ago
    too many "db/"  ...

    URLRoot() & "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
    ------------------------------



  • 7.  RE: How to add to my url formula button that changes a checkbox to ""true"

    Posted 22 days ago
    Great catch Mark! However, I am now being faced with this new error:

    <action>API_EditRecord</action>
    <errcode>24</errcode>
    <errtext>Invalid Application Token</errtext>
    <errdetail>An Application Token must be supplied.</errdetail>
    </qdbapi>

    I'm guessing I need to provide a token of some kind, however I am unsure where to place that in the formula.


    ------------------------------
    Wallace Yeboah
    ------------------------------



  • 8.  RE: How to add to my url formula button that changes a checkbox to ""true"

    Posted 22 days ago
    You have two choices.
    1. Disable the need for Application tokens.  The setting is in the Application Properties tab.  You will need to read up on that and decide if you feel that you need that extra layer of security.

    2. If you do want to use them, then you go into manage Application tokens and create one and put an extra line in your code.

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


    note that you only need the application token if you are editing or creating or deleting records, not to view.

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



  • 9.  RE: How to add to my url formula button that changes a checkbox to ""true"

    Posted 22 days ago
    Apologies for the back and forth Mark. And thanks for the quick responses.

    I was able to create the app token, however it is now saying the token has not been assigned to this Application, However, I indicated the token will be used in the app at the point of creation.

    Is there something I'm missing


    ------------------------------
    Wallace Yeboah
    ------------------------------



  • 10.  RE: How to add to my url formula button that changes a checkbox to ""true"

    Posted 22 days ago
    You are likely confusing a User Token with an Application Token.  You do not "assign" an Application Token to an App.  That only happens with User Tokens.

    If that is not clear or is not the problem, can you post your formula?

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



  • 11.  RE: How to add to my url formula button that changes a checkbox to ""true"

    Posted 22 days ago
    Looks like thats the issue. I do not see the option to add an application token, but I'm guessing thats an access issue on my end. These are the only options I see:



    ------------------------------
    Wallace Yeboah
    ------------------------------



  • 12.  RE: How to add to my url formula button that changes a checkbox to ""true"

    Posted 22 days ago
    you are not in the right place,

    You need to go to the Application home page
    Settings (gear)
    App Properties
     (what does this mean?)
         Go to the Manage Application Token page to assign a token to this application (only required for API calls).

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



  • 13.  RE: How to add to my url formula button that changes a checkbox to ""true"

    Posted 22 days ago
    Perfect! Got it to work. As always, thanks Mark!

    ------------------------------
    Wallace Yeboah
    ------------------------------



  • 14.  RE: How to add to my url formula button that changes a checkbox to ""true"

    Posted 22 days ago
    You are doubling up on the "db/"

    URLRoot() & "db/" & Dbid() & "?a=API_EditRecord....."

    ------------------------------
    Ivan Weiss
    ------------------------------