QR Code scanner lookup

Mike_T
New Member

In a form, the second column is the QR code scanner. (Iโ€™m using a uniqueID() for the key). Iโ€™m trying to get two other columns to auto populate once the qr code is scanned. When the qr code column is blank it doesnโ€™t show up in the form (which is fine). Iโ€™m using the following formula:

ANY(SELECT(QR Codes[Campaign], ([QR_Code] = [_THISROW].[QR_Code])))

and in another column:

LOOKUP([_THISROW].[QR_Code], โ€œQR Codesโ€, โ€œQR_Codeโ€, โ€œElementโ€)

in the QR Codes table i have a list of the QR codes and the reference information in the columns โ€œCampaignโ€ and โ€œElementโ€

Hereโ€™s the funny part. When I click the scanner button in the emulator and get the resulting 1111222333 code, the other columns show up with the correct information. However when I use my phone and an actual QR code, it scans the qr code fine giving me the same data as in the table, but the other columns donโ€™t appear with the relevant info.

What am i missing?

0 7 1,511
7 REPLIES 7

Steve
Platinum 4
Platinum 4

Perhaps the scanned code has extraneous spaces around it? Try wrapping [_THISROW].[QR Code] with TRIM():

ANY(SELECT(QR Codes[Campaign], ([QR_Code] = TRIM([_THISROW].[QR_Code]))))

See also:

Thanks for the reply. Unfortunately that didnโ€™t solve it. In that same vein when I do submit the form all of the logic and vlookups I have running on the google sheet recognize the QRCode just fine. So I donโ€™t think itโ€™s a formatting issue either (i.e. text, number, etc). btwโ€ฆmy qrcodes are text and the Type is set as text also. Does anyone think this could have something to do with it? Text vs number?

Iโ€™m still looking for help here. I just canโ€™t figure out why Iโ€™m not able to use a lookup or any(select in a column formula to input a value based off another columns value (qrcode scan). Anyone have any ideas? Meeting with a client tomorrow to try to explain. Thanks in advance!

As you need is time-sensitive, consider engaging support@appsheet.com for help with this.

Mike_T
New Member

OK. Works like a charm when I use Enum and โ€œhard codeโ€ the list of Campaigns into the column. Once I select the corresponding Campaign the resulting enum list is triggered in the ShowIf of the other column.

The goal is to have the QRCode scan trigger the Campaign column which will trigger which of the 3 columns is shown.

Basicallyโ€ฆ if QRCode โ€œAโ€ is scanned, โ€œ1โ€ will appear in the โ€œCampaignโ€ column. Then column โ€œBlueโ€ will Show with Enum List of โ€œPaleโ€ โ€œBabyโ€ โ€œNavyโ€. If QRCode โ€œBโ€ is scanned, Campaign โ€œ2โ€ is autofilled and column Red is shown with Enum List buttons of โ€œRubyโ€ โ€œScarletโ€ and โ€œLightโ€. Any thoughts why the QRScanner is not triggering the other columns?

Hi @Mike_T,

Based on @Steveโ€™s guidance, can you please try

ANY(SELECT(QR Codes[Campaign], (TRIM([QR_Code]) = [_THISROW].[QR_Code])))

Yep. Tried the TRIM formula and did not work. Itโ€™s the same values in the columns. When I do submit the form data all of the vlookups in my google sheets work just fine, so I know the text matches.

Thanks for the suggestion!

Top Labels in this Space