Discussions

Redirect not functioning on QR Code

  • 1.  Redirect not functioning on QR Code

    Posted 20 days ago
    Do redirects function differently based on a rich text vs formula url field?

    I have a rich text field that generates a QR code that adds a new record; I want this code to not just add the record but also to redirect back to the page it came from.  I can't seem to figure this out so created a formula URL field to dig deeper into the issue and the formula URL field is able to take the same URL component of the rich text field and do the redirect - not sure why the QR code version isn't doing so.

    Formula URL field (goes to add inventory table and then redirects back to the page it came from):

    URLRoot() & "db/" & [_DBID_INVENTORY_PRODUCTS] & "?a=API_GenAddRecordForm&_fid_8=" & URLEncode ([Order - Expected Inventory Record ID#]) &
    "&_fid_12=" &URLEncode([Product Name]) &
    "&_fid_15=" &URLEncode([Record ID#]) &
    "&_fid_6=" & Now() &
    "&z=" & Rurl()

    Rich Text field 1 that generates QR code (goes to add inventory table but upon saving displays the new record - no redirect):

    "<img src=\"http://chart.apis.google.com/chart?chs=87x87&amp;cht=qr&amp;chld=|0&amp;chl="
    & URLEncode (URLRoot() & "db/" & [_DBID_INVENTORY_PRODUCTS] & "?a=API_GenAddRecordForm&_fid_8=" & [Order - Expected Inventory Record ID#] &
    "&_fid_12=" &URLEncode([Product Name]) &
    "&_fid_15=" &URLEncode([Record ID#]) &
    "&_fid_6=" &URLEncode(Now()) &
    "&z=" & Rurl())

    Rich Text field 2 that generates QR code (just refreshes the same record I am scanning from):

    "<img src=\"http://chart.apis.google.com/chart?chs=87x87&amp;cht=qr&amp;chld=|0&amp;chl="
    & URLEncode (URLRoot() & "db/" & [_DBID_INVENTORY_PRODUCTS] & "?a=API_GenAddRecordForm&_fid_8=" & [Order - Expected Inventory Record ID#] &
    "&_fid_12=" &URLEncode([Product Name]) &
    "&_fid_15=" &URLEncode([Record ID#]) &
    "&_fid_6=" &URLEncode(Now()) &
    "&rdr=" & URLEncode(URLRoot() & "db/bqx9m46ga?a=dr&rid=" &URLEncode ([Order - Expected Inventory Record ID#])))


    ------------------------------
    Niraj Shah
    ------------------------------