Scan barcode with your native mobile camera and jump to target view

I suppose loads of people are using Scanning functions here and there withi the app you generated. Probably most common case would be ; -

Dynamically generate the QR code using the third party APIs to display QR as Image on your app. Initially Appsheet introduced this tool and site, https://qrcode.tec-it.com/en, as free qr code generator. I have been using the same on my production App, and working well so far.

Again, basic usage of QR code is (least for my case) that we generate Virtual Column where we construct the dynamic URL to generate the qr and display it as Image. The variable within the URL is basically IDs for the row in question.
Then attach action for LINKTOVIEW expression. The user captures the QR code and it is convered to text, i.e. it will capture the IDs for the row. Then pass that value to the linktoview action. By doing so, user will scan the code and without saving it, the user will be prompted to the targed view easily. It works perfect. However, some of my clients gave me a feedback, it is troublesome. They dont want to open the appsheet app for scan. They just want to open their camera over the mobile phone (cell phone in US term?) and scan the code. Then the Appsheet app to open up to display the target view.

Have been working for a while to respond to this request from the client.

Eventually find a loop hole to make it happen.

Let me briefly explain how to do.

First, generate the dynamic URL in virtual column.

The expression is like this.

https://www.appsheet.com/start/{AppID}#control=”&
encodeurl(“TargetViewName”)&"&row="&encodeurl([IDofYourTargetRow])"

This will generate the public full path URL to jump to the view you want to see. Once you generate it, then set the data type to URL. Test it out if you will see the target view you want by opening up dynamic URL on your browser. I will call this VC as [publicurl]

After making sure it works, then create another new VC.

This time, to construct the dynamic QR code.

The expression is like this.

https://qrcode.tec-it.com/API/QRCode?data=”&encodeurl([publicurl])
&"&backcolor=%23ffffff"

And set the data type to Image. It is possible Thumbnail type may work, but sometime the scanner will not recognize the strings propertly with the tiny QR code, so better to stay with image type as my suggestion.

Set this filed type as Image.

Once you generate those two fields, job is done.

Open up your native camera on your device and scan the code. I only tested iOS, but once the camera scann the code, the Safari will recognize the code. Click safari on the top.

You will see the target view within Appsheet App. Lovely.

I will be placing this new QR code on various template, like invoice, statement etc.

Once the user see the docs on the table, then they scan the QR code on the header where I usually place the code.

Without opening the Appsheet app, just by scanning the code from the doc, they will be able to prompt the Appsheet app with the target page upon opening and can immidiately start to work for something.

Again, I tested with my I phone which worked fine, but not sure how it work on other device like Android. Appreciate for your feedback , testing with other devices and any other new idea you notice to make this workflow better and possible usages as well.

10 Likes

Nice trick!

1 Like

Same idea with NFC Tags:

3 Likes

Yeah thank Fabian. Yes the same talks just using different URL syntax to do the same.

This is very interesting thank you for sharing.

@tsuji_koichi could you elaborate on this part of the process please.
How do you setup a temporary value like a scanned QR code to be passed to a LINKTOVIEW action.

Thanks all

I placed sample app to my portfolio like this.

https://www.appsheet.com/samples/Sample-App?appGuidString=7f351778-ec9e-430b-9273-ad1017350fb4

Open up the app and one of view on browser and scan qr code with mobile phone camera, then it will open up the app view at the end.

Any Appsheet action is NOT involved in this app.

3 Likes