The OCR (Optical Character Recognition) Field type lets you convert written or printed information into text via your device's camera.
This premium feature allows a user to capture or upload an image and rapidly convert any text found in the image into raw text or JSON response.
- Setting up an OCR Field
- Result Examples
- Raw Text
- Raw JSON
Note, the OCR field requires an internet connection to return image text.
Setting up an OCR Field
After creating a new Form screen, you will be taken to the Form Designer screen. The Form Designer screen provides a visual view of your Form, as well as a drag and drop approach for creating your Form design.
Along the left section of the Designer, you will find a column of Basic and Advanced Field types.
The OCR Field can be found under our Advanced Field types.
Unique properties specific to the OCR field are:
Result Mode
- Raw Text
When this option is chosen, the raw text (extracted from the image) result will be displayed. - JSON
When this option is chosen, the full OCR JSON response will be available in other fields via the JSONVAL() formula.
For more information on JSON formula, please review Formula Cheat Sheet - Data Interchange.
On Capture Action
- Define an action each time a successful OCR result is returned.
Result Examples
Raw Text
Image uploaded from device gallery.
Raw JSON
Image uploaded from device gallery.
The above image depicts a RAW JSON Results (Text field) with its dynamic value property being driven from the OCR Field - JSON Mode's (OCR field) dataname.
Form Designer Build:
The JSON result can be processed using JSON Path Syntax.
JSON Result (full)
JSON Result (retrieve all words text)
Syntax:
$.readResults[0].lines[*].words[*].text
However, in a Text field's dynamic value, the above syntax would need to be used in junction with our JSON() function.
Formula:
SUBSTITUTE(STRING(JSONLIST({{myOCRfieldJSON }}, 'readResults[0].lines[*].words[*].text')) , '|' , '\n')
For more information on JSON formula, please review Formula Cheat Sheet - Data Interchange.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article