QR Code

The QR Code component is used to generate and display a QR Code based on a value provided.

Targets

QR Codes have the option to get a value from a target.

Only a single string value can be returned, if a single string value is not returned the QR Code will fail to load.

Component Code

The first section of the component contains all the variables needed for the component to function.

OnParametersSetAsync()

This method is called when the component is first loaded and anytime there’s an update to its parent component. This methods purpose is to pull and assign values to the various variables for the component from data in the field definition and to set the value of the QR Code based on the Value Type specified in the field definition.

  • Static – The value is pulled directly from the field definition.
  • XML Element – The value is pulled from the Instance Data from the selected XML Element.
  • Target – The value is returned from the target specified in the field definition.

Additionally, if an encoding type was specified it is applied to the value so when scanned the QR Code will do an action. For example, if the encoding type Geolocations was selected then when scanned the QR Code will attempt to open a map application on the device and navigate to the coordinates specified in the value.

If no value is provided then the QR Code cannot be generated and an error message will be displayed instead saying no value could be found.

Updated on November 13, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment