Forum Discussion

JohnOgle's avatar
JohnOgle
Qrew Trainee
5 years ago

URL To Return To Report

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
------------------------------

4 Replies

    • JohnOgle's avatar
      JohnOgle
      Qrew Trainee
      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
      ------------------------------