The file parser control is a logic control that parses XML, CSV or JSON files.
- Label : Label is the text that is displayed above the control and helps the user to understand the purpose of the file parser control. Visibility of Label can be toggled using the hidden property toggle option. Furthermore, size, weight, color and alignment of Label text can be altered.
- Tooltip: This allows you to add the Tooltip text that would provide a hint to the user for providing input. The Tooltip icon would be visible if you switch on the Show tooltip icon toggle property.
- Description: Is the description that you can add for your controls. The Description would only be visible if you switch on the visibility toggle property
- External CSS: With this property, one can imply exclusive CSS on controls. You can customize your control with CSS by selecting the correct class or id of the control. You can read more here.
Caching : When the caching option is selected and if a LOOKUP formula is applied to this control, the value that the LOOKUP returns will be cached and the user will be able to see this value in the fields even when he accesses the microapp later with no connectivity. This option is required when you want your app to be accessible in offline mode as well and getting the latest data from the sheets is not always critical.
Hidden : The hidden option helps to hide the control from the user. This helps when you don’t want the user to view the control.
Trigger Dependents : When you Disable Trigger Dependents, it helps you to reduce or optimize the unnecessary evaluation of the dependent control’s formula. For a detailed explanation refer to this article here ..By default Trigger dependents are enabled. However, in complex apps by switching it off, you would limit the evaluation in the dependent control and in turn ensure quicker response times.
- Hide on desktop : This option hides the selected control in the desktop view
- Hide on Mobile : This option hides the selected control in the mobile view.
- Dynamic Height : This option dynamically increases /decreases the height of the text control based on the given content.
- Maintain space when hidden : This option maintains the specified space between controls when a particular control is hidden. When a control is hidden the space is maintained in the preceding control depending on the space the previous control has occupied.
- Maximum height : This option is used to set the maximum height of the control. Height can be in following units :- px, em , vh, %. For more information about these units, refer here.
Note :- Hide on desktop, Hide on Mobile, Dynamic Height and Maintain space when hidden are available in Basic Freeflow Editor Only.
- Size:- This option sets the size of text within the file parser control. Size can be in following units :- px, em , vh, %. For more information about these units, refer here.
- Weight:- This option sets the font weight (boldness) of the text.
- Color:- This option sets the text colour.
- Text:- This option helps to set the text within the control.
- Theme:- This option helps to set the color of border around text.
Layout:- This option helps to set the style of border around text.
- Filled:- fills the text box with theme color.
- Outlined:- sets lined border with theme color.
- Dashed Outline:- sets dash lined border with theme color.
- Sample File:- This option helps to set the default file that is to be used. You can provide a sample file or a link to a sample file. The file can be of any format like XML, CSV or JSON but it must have the same headers as the sample file. Only then can the uploaded file be parsed.
Headers:- If the sample file is successfully parsed, you can see the headers below the Sample File option.
How to use file parser control
From the controls option on the left sidebar, search for File Parser control, pick and drop this control on your screen.
You can use the data option to bind data to file parser Control. You can learn more about validations here. There are different ways in which you can bind data.
Static Data: You can add Static data as a string. Data will be a URL endpoint that will point to data.
Sheets: You can use data from sheets as well.
You can specify the sheet, the columns and in case you want additional filters and sorting, you can apply them. To learn more about the filters and sorting, refer here.
Controls: You can select Controls>fieldname to fetch data from for the file parser control.
Variables and Keywords: You can make use of the Variables and Keywords to get data for the file parser control.
Query String: This assigns the value returned by the Query string.
Logged In User: This allows you to select properties for the Logged In user like UserName, UserMail that would be the data for the file parser control.
Connectors: This allows you to add a Connector and select the values returned by the respective Connectors.
Custom Formula: This can be used to apply formulas and use the output of those formulas to set the control. You can learn more about formulas here.
The basic flow here is :-
- App admin uploads a sample file that gets parsed and headers can be verified from the headers section.
- In the app, users can try to upload a file. Uploaded files can be of any format like XML, CSV or JSON as long as the schema matches the sample file, i.e the headers of uploaded file are same as those of the sample file.
Check out Using File Parser Control article to see how its used in App.