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 )
Inspiration was also coming from this thread
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
@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);
}
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:
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.
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
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) 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…