Capture data using NFC | Zoho Creator Academy

Capture data using NFC

Requirement

Capture data from NFC supported tags.

Use Case

An organization wants a mechanism where its employees can submit feedback about its cafeteria and restrooms by tapping their NFC- enabled ID cards against the feedback collecting phone/tablet. The phone/tablet displays a Creator form which captures the employee's details using the ID card and provides a field to enter feedback.

See how it works

Prerequisites

  1. The target NFC tags and stickers must contain data as per the NFC Data Exchange Format (NDEF).
  2. The end user's Android device must contain NFC hardware. They can check this availability by searching for "NFC" in their device's  Settings.

Steps to follow

Note: To be able to try-out this tutorial, you will need an NFC tag which has the employee ID and email pre-written in the tag. You can refer to online articles to learn how to write NFC tags. 

1. Create a form named Report Issue with the following details.

 

Field Type

Field Name

Field Link Name

Multi Line

Feedback

Feedback

Single Line

Employee ID

Employee_ID

Single Line

Employee Email

Employee_Email


2. Create a page named Feedback and add a button to it. 

3. Set the label as Submit Feedback

4. Set the following details in the Action section with the Query parameters as follows:
  1.  zc_NFCTAG_Employee_ID=0&zc_NFCTAG_Employee_Email=1

See how it works


Points to Note

  1. The Employee ID and Email is already written for the ID cards (NFC tags) using online tools. 
  2. Since NDEF allows the tag to contain one or more records (data points), you'll need to pair the NDEF records with the fields in your form. In other words, you'll have to map the data stored in the NFC tag with your fields. 
  3. You can enable NFC for Zoho Creator forms by simply using the predefined query strings in the following format:
  1. zc_NFCTAG_<fieldLinkName1>=0&zc_NFCTAG_<fieldLinkName2>=1...&zc_NFCTAG_<fieldLinkNameN>=n
where,
    1. 0, 1, and n represent the first, second, and nth NDEF (NFC Data Exchange Format) records (data points) in the tag
    2. fieldLinkName1, fieldLinkName2, and fieldLinkNameN are link names of fields in which you want to input data by reading the NFC tag.
  1. In this tutorial we are specifying the query params for the form in Step 4. You can also use openurl deluge task with the appropriate query params, or you can also add an HTML snippet to a page and embed the required form using <div> container.
  2. In the app, the form can be restricted using permissions and the ID and Email fields can be disabled to avoid data manipulation during feedback submission.
  1. Reading NFC tags in Zoho Creator
  2. OpenURL task