Discussions

Expand all | Collapse all

URL To Return To Report

  • 1.  URL To Return To Report

    Posted 08-25-2020 15:51
    I've managed to cobble together this URL to return to the relevant record after changing some field values. In a separate context, I want to execute the same actions but return to a report. The solution I believed should work does not, see below:

    var text URLOne=
    URLRoot() & "db/" & Dbid() & "?act=API_EditRecord & rid=" & [Record ID#] & "&apptoken=abcd"
      & "&_fid_98=" & ToNumber([Current Inventory]+[delta value])
      & "&_fid_112="
      & "&_fid_110=" & URLEncode([Inventory Delta]=0);

    var text URLTwo=
    URLRoot() & "db/" & Dbid() & "?a=er&dfid=2&rid=" & [Record ID#]; $URLOne & "&rdr=" & URLEncode($URLTwo)

    //I replaced the above line with the following and did not get the result I was looking for
    //URLRoot() & "db/" & Dbid() & "?a=q&qid=3"; $URLOne & "&rdr=" & URLEncode($URLTwo)


    ------------------------------
    -JT
    ------------------------------


  • 2.  RE: URL To Return To Report

    Posted 08-25-2020 15:53
    Can you post the clean code for the formula that does not work?

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



  • 3.  RE: URL To Return To Report

    Posted 08-25-2020 16:15
    I believe I understand what you're asking, forgive me if this does not help.

    This is the part that works,
    var text URLOne=
    URLRoot() & "db/" & Dbid() & "?act=API_EditRecord & rid=" & [Record ID#] & "&apptoken=abcd"
    & "&_fid_98=" & ToNumber([Current Inventory]+[delta value])
    & "&_fid_112="
    & "&_fid_110=" & URLEncode([Inventory Delta]=0);
    var text URLTwo=
    URLRoot() & "db/" & Dbid() & "?a=er&dfid=2&rid=" & [Record ID#]; $URLOne & "&rdr=" & URLEncode($URLTwo)

    It stops working when I attempt to point it to a report when done by making it look like this,
    var text URLOne=
    URLRoot() & "db/" & Dbid() & "?act=API_EditRecord & rid=" & [Record ID#] & "&apptoken=abcd"
    & "&_fid_98=" & ToNumber([Current Inventory]+[delta value])
    & "&_fid_112="
    & "&_fid_110=" & URLEncode([Inventory Delta]=0);
    var text URLTwo=
    URLRoot() & "db/" & Dbid() & "?a=q&qid=3"; $URLOne & "&rdr=" & URLEncode($URLTwo)

    ------------------------------
    J. T. Ogle
    ------------------------------



  • 4.  RE: URL To Return To Report

    Posted 08-25-2020 16:24
    It looks correct.  What is the symptom of the problem.  What happens when you push the button?

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



  • 5.  RE: URL To Return To Report

    Posted 08-25-2020 16:46
    That did! As usual, reading more carefully solved the problem. The report I was pointing to was private/unlisted.

    My first code modification produced the error message, record does not exist. I cleaned up the code to what it looks like now and got was I thought was the same error. It was not. The new error message was the report does not exist.

    Thanks again Mark

    ------------------------------
    J. T. Ogle
    ------------------------------