Discussions

 View Only
Expand all | Collapse all

I've created a QR Code, now how to I print them all?

  • 1.  I've created a QR Code, now how to I print them all?

    Posted 03-09-2023 16:19

    I've used techniques I found in the community to create a reach text field that shows an image of a QR Code. It looks perfect, every record has it's own unique QR code. Now I am stuck - how to I physically print these out? I was trying to figure out how to possibly use mail merge in word, so I could put them on say Avery labels? 

    I know I could cheat by taking a screen shot, saving as an image, and printing, but that obviously isnt a real solution (I have 500+ to print). How have people gone about printing?



    ------------------------------
    Mike Tamoush
    ------------------------------


  • 2.  RE: I've created a QR Code, now how to I print them all?

    Posted 03-09-2023 17:21

    Great Demo App here from Juiced for either a native or a Juiced EF+ solution. 

    https://juicedtech.quickbase.com/db/biji85xs9



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: I've created a QR Code, now how to I print them all?

    Posted 03-09-2023 17:49

    Thanks Mark. Unfortunately, the native solution is only for text. There are some resources to get an image, but the last 4 hours of trying for me have failed. I think the Juiced solution will also utilize text only, but I'll look into it! Thanks. Otherwise, I maybe have to go to a QR code site, import my URLS and use their native software to download everything as image files? Perhaps?

    Im still researching. Hopefully someone in the community has already figured this out!



    ------------------------------
    Mike Tamoush
    ------------------------------



  • 4.  RE: I've created a QR Code, now how to I print them all?

    Posted 03-09-2023 19:27

    I can think of at least one way to do this in native Quickbase, but it's extremely inconvenient.  Also on mobile right now, so I can't type out all of the formulas.

    In whatever table houses the QR codes, you can create another rich text formula field that just encompass the existing QR code field in a <td> tag.  We can call this [QR Container].

    Then you can have a formula query field that uses size() and getrecords() to find the number of QR code records with a record ID# less or equal to that record.  So Record ID# 1 will return 1, Record ID# 2 will return 2, etc.  I'll call this [Lower RIDs].

    Then you have another formula query field.  Let's say you want the printed copy to have 4 QR codes per row. If the [Lower RIDs] value is divisible by 4, it uses getfieldvalues() and getrecords() to collect the [QR Container] values of all records where [Lower RIDs] is greater than or equal to that record's [Lower RIDs] value minus three, but lower than or equal to that record's [Lower RIDs] number.  So RIDs 1-3 would return blank values (not divisible by 4), and RID 4 would return a list of the [QR Container] fields for RIDs 1 through 4.  You can use searchandreplace() on this value to replace " ; " with "", which will give you an HTML string.  You can then encompass this string in a <tr> tag.  We can call this field [Table Row].

    Finally, you have a formula query field that gets the values of [Table Row] for every record where it isn't blank.  Then you use searchandreplace() on this field to replace " ; " with "".  This gives you another HTML string, which you encompass in a <table> tag.  We can call this [Table].

    Then you add an Exact Form for the QR codes table that only includes "~fid~", where fid is the field id# of your [Table] field.  This will give you a button on every record that when clicked, will give you a big Exact Form with a table of all of your QR codes that you can print.  I have done similar things to this in the past, and I know that rich text fields will render properly in the Exact Form (including images like your QR codes).

    Just writing this out, I'm sure it's terrible performance wise.  There are definitely ways to optimize this by say, only having your fields make a table of the previous 100 records.  So if you click on the button on your most recent record, you'll get your 100 most recently generated QR codes, but you won't be pulling together as much data as many times.  Or maybe you only populate [Table] on the 5 most recent records, and if it's older than that it just returns a blank value.

    Realistically, the easiest way to do this is with a code page, but that comes with its own set of headaches.  And if you're not already comfortable writing JS code, it really isn't worth learning it just for Quickbase. They offer so many great no code tools that are easier and faster for 99% of use cases, that the time spent learning wouldn't justify itself for the limited number of times you'd use it.  If this functionality is really important I'd recommend just going with the tedious native QB solution.



    ------------------------------
    Tyler Jablonski
    ------------------------------



  • 5.  RE: I've created a QR Code, now how to I print them all?

    Posted 03-09-2023 19:35

    Your post and Marks post finally sparked a solution in my mind. I have Juiced EFP. In juiced EFP I can produce a child table shown on my output pdf. I can just utilize that, and make a parent to all my records in a dummy table or any other way. In fact, I need to look closer at Marks link, that is probably how their mail merge button push works.



    ------------------------------
    Mike Tamoush
    ------------------------------



  • 6.  RE: I've created a QR Code, now how to I print them all?

    Posted 03-09-2023 22:18
    Edited by Keith Jusas 03-09-2023 22:26

    Mike,

    Exact Forms Plus can generate QR Codes using a function in the template itself

    click link below to a record in our demo app: https://juicedtech.quickbase.com/db/bknf8jnve?a=dr&r=g&rl=zcf 

    Scroll right to the Labels tab and click the Create Task Labels button.

    some of the parameters in the formula code of the button

    clientid=Q999"
    & "&appid=" & AppID()
    & "&tpdbid=" & [_DBID_DOCUMENT_TEMPLATES]
    & "&tpid=41"
    & "&fn=Lbl"
    & "&msdb=" & [_DBID_TASKS]
    & "&docfmt=pdf&stream=y"
    & "&mrgdbid=" &Dbid()
    & "&mrgrid=" & [Record ID#]
    & "&mrgfn=lbls"
    & "&mrgfa=345"
    & "&msqry={'48'.EX." &[Record ID#] & "}");

    Attached is the document template and the labels pdf

    The field in the task table, field id 149, is a formula URL field with the following value so when the QR Code is scanned it will display the Task record
    URLRoot()&"db/"&Dbid()&"?a=dr&rid="&[Task ID]

    More info on Barcodes for EF+
    http://qbtools.helpdocsonline.com/exactformsplus-barcodes

    ------------------------------
    Keith Jusas
    ------------------------------

    Attachment(s)

    docx
    label 4x6.docx   14 KB 1 version
    pdf
    lbls_6 (4).pdf   196 KB 1 version


  • 7.  RE: I've created a QR Code, now how to I print them all?

    Posted 03-10-2023 10:13

    Thanks Keith! I'll take a look. This could likely work, though I know we were trying to get our logo in the middle, which I have created but would need to use my custom link in order to print that, which is my my head went towards using EFP utilizing the embedded report feature. EFP has so many features, it's hard for me to keep up! :)



    ------------------------------
    Mike Tamoush
    ------------------------------



  • 8.  RE: I've created a QR Code, now how to I print them all?

    Posted 03-13-2023 13:32

    Hi Mike,

      I wanted to share an update...I  looked into the ability to include a logo in the middle of the QR Code that we generate in Exact Forms Plus and it looks like we will be able to do that.  Won't be available until April/May though, I'll keep you updated.  



    ------------------------------
    Keith Jusas
    ------------------------------



  • 9.  RE: I've created a QR Code, now how to I print them all?

    Posted 03-13-2023 13:42

    Thats awesome news Keith! I'll look for that update in the coming months.



    ------------------------------
    Mike Tamoush
    ------------------------------



  • 10.  RE: I've created a QR Code, now how to I print them all?

    Posted 03-13-2023 16:07

    That will be great, Keith!!



    ------------------------------
    Edward Hefter
    www.Sutubra.com
    ------------------------------



  • 11.  RE: I've created a QR Code, now how to I print them all?

    Posted 03-13-2023 16:12

    Mike,

    One of the issues I had with QR codes from Quickbase is that the URL is often super long, which means that the QR code has to be relatively large on the paper to fit all the information in a way that the camera can read it (forget a 150x150 code - too small!). I figured out how to use the API with TinyURL to get a much shorter URL for the long Quickbase ones, which lets me print smaller QR codes. TinyURL's free plan lets you do 600 URLs per month and their paid plans don't cost that much.

    If you need to shrink the size of your URLs, let me know and I can walk you through the TinyURL API.



    ------------------------------
    Edward Hefter
    www.Sutubra.com
    ------------------------------



  • 12.  RE: I've created a QR Code, now how to I print them all?

    Posted 03-13-2023 16:37

    Nice tip Edward!



    ------------------------------
    Keith Jusas
    ------------------------------



  • 13.  RE: I've created a QR Code, now how to I print them all?

    Posted 07-17-2023 10:22

    Hi Edward, 

    I know this thread is a bit old, but wondering if you were still available to walk me through how to use tiny URL api to shorten the link?

    Thanks.



    ------------------------------
    Mike Tamoush
    ------------------------------



  • 14.  RE: I've created a QR Code, now how to I print them all?

    Posted 07-17-2023 12:28

    No problem, I put the YAML for it underneath my description:

    When a record is created, there is a long URL generated that does what I want with the QR code (in this case, it is adding a record to a different table). The creation of the record triggers the Pipeline, which does a FETCH from TinyURL and "iterates" the return (there is only one record returned) over the record from step A. The information in step C is just some sample data from the first time I ran it so I could get the pattern for the rest.

    Let me know if this helps!

    # MPB - Get a TinyURL for the Task QR Code
    #

    # Account slugs:
    # - quickbase[XXXXXXXX]: MPB App <None>
    ---
    - META:
    name: MPB - Get a TinyURL for the Task QR Code
    tag_names:
    - MPB
    enabled: true
    - TRIGGER quickbase[XXXXXXXX] record on_create -> a:
    inputs-meta:
    export_fields: '"URL for Temp Table Scan, TinyURL for Scan In/Out URL" <35,
    49>'
    table: '"MCAS - Midwest Panel Builders: Tasks" <XXXXXXXX>'
    - ACTION json-handler json_source fetch_json_blob -> b:
    inputs-meta:
    authentication_schema: no-auth
    body: "{ \"url\":{{a.url_for_temp_table_scan|to_json}},\n \"domain\": \"tinyurl.com\"\
    ,\n \"alias\": \"\",\n \"tags\": \"\"}"
    headers: 'content-type: application/json'
    json_url: https://api.tinyurl.com/create?api_token=YourOwnTokenGoesHere
    method_type: POST
    - b<>QUERY json-handler json_object search -> c:
    inputs-meta:
    json_schema_sample: "{\n \"data\": {\n \"url\": \"https://sutubra.quickbase.com/db/XXXXXXXX/(_DBID_TEMP_TABLE_FOR_CLOCKING_IN_AND_OUT)?a=API_AddRecord&_fid_7=559&_fid_8=Now&apptoken=YourOwnAppToken&rdr=https%3A%2F%2Fsutubra.quickbase.com%2Fdb%2FXXXXXXXX%2F(_DBID_TIMECARDS)%3Fa%3Dq%26qid%3D8\"\
    ,\n \"domain\": \"tinyurl.com\",\n \"alias\": \"XXXXXXXX\",\n \"\
    tags\": [],\n \"tiny_url\": \"https://tinyurl.com/XXXXXXXX\"\n },\n \"\
    code\": 0,\n \"errors\": []\n}"
    - c<>LOOP:
    - DO:
    - a<>ACTION quickbase record update -> d:
    inputs:
    tiny_url_for_scan_in_out_url: '{{c.data_0.tiny_url}}'
    ...



    ------------------------------
    Edward Hefter
    www.Sutubra.com
    ------------------------------