Discussions

Expand all | Collapse all

Making a simple mistake on rich text URL

  • 1.  Making a simple mistake on rich text URL

    Posted 23 days ago
    I seem to be making a somewhat simple mistake on a rich text field that I can't seem to get figure out. The field generates a QR code which, when scanned, adds a record to another table and populates some fields in that table. 

    My code is below:

    "<img src=\"http://chart.apis.google.com/chart?chs=200x200&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])

    & "\" alt=\"Scan to add a ticket\" title=\"Scan to add a ticket\"/>"

    The code above works fine from a syntax perspective and even populates FiD 8 has intended, however, it's not populating FiD 12. Both FiD 12 and [Product Name] are the same field types of Text fields.

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


  • 2.  RE: Making a simple mistake on rich text URL

    Posted 23 days ago
    Edited by Niraj Shah 23 days ago
    I recreated this as just a URL - formula field and it works as intended - but I really need it to be a QR code..

    Code for the formula URL:

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



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



  • 3.  RE: Making a simple mistake on rich text URL

    Posted 23 days ago
    I think that the issue has to do with this part


    & "\" alt=\"Scan to add a ticket\" title=\"Scan to add a ticket\"/>"

    try getting it to work without that line or else just ending with 

     & ">"



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



  • 4.  RE: Making a simple mistake on rich text URL

    Posted 23 days ago
    Thanks, Mark.

    When I do that, the code is accepted, however no QR code image appears. My code is below and my image is attached

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

    & "/>"




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



  • 5.  RE: Making a simple mistake on rich text URL

    Posted 23 days ago
    try this
    "<img src=\"http://chart.apis.google.com/chart?chs=75x75&amp;cht=qr&amp;chld=|0&amp;chl="
    & URLRoot() & "db/" & [_DBID_INVENTORY_PRODUCTS] & "?a=API_GenAddRecordForm&_fid_8=" &URLEncode ([Order - Expected Inventory Record ID#])) &

    "&_fid_12=" &URLEncode([Product Name]) &
    "&_fid_6=" &Now() &
    "&z=" & Rurl()

    & "/>"

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



  • 6.  RE: Making a simple mistake on rich text URL

    Posted 23 days ago
    I tried your version of the code and I get a syntax error due to the extra parentheses after the:  ([Order - Expected Inventory Record ID#])) &

    I removed the extra parentheses and the syntax was accepted but the QR code image still shows up as a broken image link.

    Updated syntax:

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

    & "/>"
     


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



  • 7.  RE: Making a simple mistake on rich text URL

    Posted 23 days ago
    Have you tried this version?

    "<img src=\"http://chart.apis.google.com/chart?chs=75x75&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_6=" &URLEncode(Now()) &
    "&z=" & Rurl())

    & "/>"

    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quick Base Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------



  • 8.  RE: Making a simple mistake on rich text URL

    Posted 23 days ago
    Thanks, Blake.

    I just tried this in my application and the QR code is still not appearing; just a broken image as referenced above.

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



  • 9.  RE: Making a simple mistake on rich text URL

    Posted 23 days ago
    Blake, this issue has been somehow solved. 

    I took your iteration of code above and then just re-added my last statement with the help text for the code and it worked. The complete code is below for reference:

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

    & "\" alt=\"Scan to Inventory\" title=\"Scan to Inventory\"/>"



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



  • 10.  RE: Making a simple mistake on rich text URL

    Posted 23 days ago
    Thx for posting the solution!

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