# QR code scanner demo

**URL:** <https://community.glideapps.com/t/qr-code-scanner-demo/11620>\
**Category:** Community Resources\
**Created:** [June 28, 2020, 1:54pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620 "2020-06-28T13:54:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)\
**Post date:** [June 28, 2020, 1:54pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/1 "2020-06-28T13:54:38Z")

</div>

URL: [https://qrcode.glideapp.io/](https://qrcode.glideapp.io/)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/c/c015a681d0d09515b336d00a56245f0f2a941167.png)  
There a been a number of posts regarding QR code scanner functionality. A native Glide QR code scanner would be very beneficial - so this app is just a kind of workaround.

@Zhijing_Eu made a great presentation earlier on (and I forgot which service he used so I started a search for a QR code decoder myself and ended up with the same as him 🤪 )

> [@Scan barcode and QR code directly in Glide into a field in a form](https://community.glideapps.com/t/scan-barcode-and-qr-code-directly-in-glide-into-a-field-in-a-form/1132/24):
>
> Hi everyone - I cobbled together a solution to allow users to scan QR Codes in Glide. It works by using Image Picker in the Layout which then creates a URL of an image hosted by GlideApps that is input into Google Sheets. I then wrote a script in Google Sheets that takes the URL and runs it through an API that decodes QR images and then I used a REGEX in the script to pull out the relevant info I am looking for and output it into the relevant columns. I did a short write up : [https://www.linke…](https://www.linkedin.com/pulse/building-basic-access-records-tracker-contact-tracing-eu-zhijing)

Inspiration was also coming from this thread

> [@QR Code - Attendee Check-In](https://community.glideapps.com/t/qr-code-attendee-check-in/11549):
>
> We need the ability to check attendees in via a QR code. Now more than ever, contactless solutions are important for us given the situation with COVID-19. Request: (1) generate QR code upon user registration (2) check-in attendee by scanning QR code

The app makes use of two scripts (one for pulling json data from the QR decoder and one for adding new lines in the sheet when somebody enters a new QR code - sorry @ThinhDinh - it isn’t pretty what I have done - I know you can clean it up 🙂 )

The uploaded image by use of the image picker is sent to Cloudinary as Glide doesn’t allow to reduce file size and that is needed for the QR decoder service (as @Zhijing_Eu also mentioned as a problem)

I have made the app copyable.

**Notice**

- create you own cloudinary account (the app is using my account) if you want to experiment with numerous QR codes.
- don’t upload personal or sensitive data to the app as the app is copyable
- uploaded QR code images will be deleted with regular intervals as they cannot be fetched into a folder in Cloudinary - so my account will get messy 🤪

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 28, 2020, 2:05pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/2 "2020-06-28T14:05:12Z")

</div>

Excellent as always 😄

Was trying to upload 1 with QR and 1 ordinary image to see if it works the right way, it’s good 👍

---

<div class="post-metadata">

**Author:** ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)\
**Post date:** [June 28, 2020, 3:06pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/3 "2020-06-28T15:06:48Z")

</div>

@ThinhDinh Actually something didn’t work correctly so the inline list didn’t show up correctly. Should do now.

Is there a way to simplify the script (based on you initial description)

```
function fillFormula() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName('QR scans');
  var lr = sheet.getLastRow();
  var fillDownRangeB = sheet.getRange(lr, 2, 1);
  var fillDownRangeC = sheet.getRange(lr, 3, 1);
  var fillDownRangeD = sheet.getRange(lr, 4, 1);
  var fillDownRangeE = sheet.getRange(lr, 5, 1);
  var fillDownRangeF = sheet.getRange(lr, 6, 1);
  sheet.getRange("B"+(lr-1)).copyTo(fillDownRangeB);
  sheet.getRange("C"+(lr-1)).copyTo(fillDownRangeC);
  sheet.getRange("D"+(lr-1)).copyTo(fillDownRangeD);
  sheet.getRange("E"+(lr-1)).copyTo(fillDownRangeE);
  sheet.getRange("F"+(lr-1)).copyTo(fillDownRangeF);
}
```

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 28, 2020, 3:38pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/4 "2020-06-28T15:38:26Z")

</div>

```
function fillFormula() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName('QR Scans');
  var lr = sheet.getLastRow();
  var fillDownRange = sheet.getRange(lr, 2, 1, 5);
  sheet.getRange(lr-1, 2, 1, 5).copyTo(fillDownRange);
}

```

That getRange method can be used in multiple ways:

- `getRange(row, column)`
- `getRange(row, column, numRows)`
- `getRange(row, column, numRows, numColumns)`

Here I’m using the last method:

- row: Last row
- column: Start from B so 2
- numRows: 1
- numColumns: 5

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [June 28, 2020, 4:44pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/5 "2020-06-28T16:44:51Z")

</div>

Thank you for this!

---

<div class="post-metadata">

**Author:** ![Zhijing\_Eu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/zhijing_eu/32/8030_2.png) [@Zhijing\_Eu](https://community.glideapps.com/u/Zhijing_Eu)\
**Post date:** [June 29, 2020, 5:05am UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/6 "2020-06-29T05:05:08Z")

</div>

Awesome piece of work ! I also like how you kept it super simple without the need for any scripting by concatenating url-s from the image URLs stored from Image Picker in Glide feeding into Cloudinary API and then the QR Code Reader API.

Hopefully the folks at Glide will roll out a native solution soon instead of expecting the community to keep creating workarounds but for now this looks like it will do the trick nicely.

---

<div class="post-metadata">

**Author:** ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)\
**Post date:** [June 29, 2020, 5:34am UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/7 "2020-06-29T05:34:45Z")

</div>

The service provider might not be the best one as the services seems to be down at the moment

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [June 29, 2020, 9:36am UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/9 "2020-06-29T09:36:47Z")

</div>

It’s a decoder. Just clicked. 🤣

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [June 30, 2020, 4:05pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/10 "2020-06-30T16:05:14Z")

</div>

That’s great!!

---

<div class="post-metadata">

**Author:** ![Glider](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/glider/32/9699_2.png) [@Glider](https://community.glideapps.com/u/Glider)\
**Post date:** [July 27, 2020, 4:49pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/11 "2020-07-27T16:49:12Z")

</div>

It does Not work again

---

<div class="post-metadata">

**Author:** ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)\
**Post date:** [July 27, 2020, 5:03pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/12 "2020-07-27T17:03:04Z")

</div>

Well seems so. If you want to do a great app then service providers must have services which is running all the time

---

<div class="post-metadata">

**Author:** ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)\
**Post date:** [July 27, 2020, 5:10pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/13 "2020-07-27T17:10:29Z")

</div>

Reloaded the sheet and everything came back

---

<div class="post-metadata">

**Author:** ![Glider](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/glider/32/9699_2.png) [@Glider](https://community.glideapps.com/u/Glider)\
**Post date:** [July 27, 2020, 5:16pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/14 "2020-07-27T17:16:06Z")

</div>

i used [http://goqr.me/api/](http://goqr.me/api/) and found out you can use this to create unique qrcode for each user(with a template and maybe unique id)

---

<div class="post-metadata">

**Author:** ![Glider](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/glider/32/9699_2.png) [@Glider](https://community.glideapps.com/u/Glider)\
**Post date:** [July 27, 2020, 5:18pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/15 "2020-07-27T17:18:23Z")

</div>

also when i reload your app (copied version) nothing changes

---

<div class="post-metadata">

**Author:** ![Glider](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/glider/32/9699_2.png) [@Glider](https://community.glideapps.com/u/Glider)\
**Post date:** [July 27, 2020, 5:25pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/16 "2020-07-27T17:25:15Z")

</div>

solved did not have importjson

---

<div class="post-metadata">

**Author:** ![profechef](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/profechef/32/221_2.png) [@profechef](https://community.glideapps.com/u/profechef)\
**Post date:** [September 28, 2020, 7:09pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/17 "2020-09-28T19:09:06Z")

</div>

I’ve been looking forward for something like this for months. It’s awesome. Thank you for your job and for sharing it.  
May be with arrayformula you don’t need the script to copy the formulas in the new row

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 28, 2020, 7:15pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/18 "2020-09-28T19:15:38Z")

</div>

I think he was using IMPORTJSON, which didn’t offer arrayformula.

---

<div class="post-metadata">

**Author:** ![profechef](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/profechef/32/221_2.png) [@profechef](https://community.glideapps.com/u/profechef)\
**Post date:** [September 28, 2020, 7:21pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/19 "2020-09-28T19:21:12Z")

</div>

That’s true!

---

<div class="post-metadata">

**Author:** ![Killko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/killko/32/39538_2.png) [@Killko](https://community.glideapps.com/u/Killko)\
**Post date:** [October 6, 2020, 1:15pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/20 "2020-10-06T13:15:09Z")

</div>

You can easily generate a QR Code in Google Sheets with a line like =image(“[https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=”&A2](https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=%E2%80%9D&A2)) where A2 contains the link or content of the QR Code.  
This would be awesome if there was a way to generate deep links automatically whenever a new row is created in Google Sheet, or to automatically guess the deep link for all items in a list using their RowID in a template ?  
But I haven’t figured out yet how to do that…

Combined with the QR Code scanner one could go to an item’s detail page by scanning its QR Code…

---

<div class="post-metadata">

**Author:** ![Pablo\_books](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablo_books/32/2110_2.png) [@Pablo\_books](https://community.glideapps.com/u/Pablo_books)\
**Post date:** [October 6, 2020, 4:37pm UTC](https://community.glideapps.com/t/qr-code-scanner-demo/11620/21 "2020-10-06T16:37:16Z")

</div>

Dude this is SO freaking helpful!! You don’t know how many times I’ve created a qr code not knowing if it worked or not!!

[Next page](https://community.glideapps.com/t/qr-code-scanner-demo/11620.md?page=2)
