14
Views
3
Comments
[Javascript QR Code Generator] pass data(variable) using qr code scan
Application Type
Mobile, Reactive
Service Studio Version
11.55.15 (Build 64075)
Platform Version
11.34.0 (Build 44828)

qr code scanning is new to me. but the problem is we have a use case where by the scan we can use redemption  a points but the thing is i dont know how to send a variable or data  that i can check to redempt is there a way to do it? thnaks?

QRCode_Scanner (1).oml
QRCode_Generator.oml
2022-12-22 10-00-39
Beatriz Sabino

Hi jesu,

You can generate a QR Code with a dynamic value. To ensure each QR Code is unique, I recommend using the server action GenerateGUID. This way, the value of the QR Code will be a combination of the GUID and your variable, ensuring that every QR Code generated is different. 

UserImage.jpg
jesu verso

didnt know about this? but generateguid is new to me how is this a validation how is it workd? but thanks!

2022-12-22 10-00-39
Beatriz Sabino

Hi jesu,

I've updated the .oml file and added a new screen called RandomQRCode. This screen includes a data action that uses the GenerateGUID server action (you'll need to add this dependency from the (System) module). To do that, just click the plug icon at the top and select the module you need.

To generate the QR codes, I'm appending the output from GenerateGUID with a value + "&" + {CountVariableValue}. This is just a placeholder, you can use any value you'd like! 

I’m using the "&" symbol simply to make these values easier to identify within the string. The GenerateGUID part ensures that each QR code is unique. 

QRCode_Example_Updated.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.