It is the action that allows Excel data in CSV format to be transferred to the Grid form tool on the form page.
Load CSV Data action in Property Panel
Properties
Description: Write a description for the action.
Heading: Specifies the name in the action list when added as a form action.
SQL Query: When writing a query in this field, as many columns should be added to the query as the number of columns in the .csv file.
Each column should be defined as COL1, COL2, COL3 ... according to the order in the file. These expressions represent the ordinal positions of the columns in the .csv file.
Each column must be given a name that matches the field names in the grid tool using alias.
Example:
COL1 AS GridField1,
COL2 AS GridField2,
COL3 AS GridField3
In the example above, the data in the first column in the .csv file will be transferred to the column named GridField1 in the grid widget on the form page.
With this mapping, each column in the .csv file will correspond to a field on the grid widget. It is important to note that the data type of the column in the .csv file must be compatible with the data type of the corresponding field in the grid tool.
The table name to be used in the query should be written as #XPODA_CSV_TABLE.
Bracket: Delimiter information must be defined to determine which character separates the fields in the .csv file to be transferred. In this field, the separator character used in the file is specified. The character ; should be written in this field.
Start Line: If the .csv file contains a header line containing column names, the data reading process should be started by skipping this line. The Start Line field is used to control this situation.
The Start Line value specifies from which line the data will be processed and the line numbering starts from 0.
If there is a header line in the .csv file, a value of 1 must be entered in the Start Line field so that this line is not transferred.
If there is no header line in the file, the Start Line field should be set to 0 as the data will be processed from the first line.
This setting ensures that only lines containing data are processed and correctly transferred to the Grid tool on the form.
Line Looking: Line Looking option determines whether the lines in the .csv file to be transferred will be processed one by one.
If the option is enabled, processing is performed separately for each line in the list.
If the option is inactive, the data is processed in batch and no row-based parsing is performed.
This setting is used when you want to perform special checks or operations on a row basis.
Run Condition: The result of the query entered in the Run Condition field determines whether the action will run or not.
If the value returned as a result of the query is ‘0’, the related action will not be run.
If a value other than ‘0’ is returned (for example ‘1’), the action will be run normally.
This feature is used to control actions under certain conditions. Thus, the action can be prevented from being activated in undesired situations.
Request Confirmation: The “Request Confirmation” option determines whether the user's approval will be obtained before running the action.
If the “Request Confirmation” option is active, confirmation is obtained from the user before the action is executed.
In this case, the "Confirmation Message" field becomes active and the informative message to be displayed to the user is defined in this field.
Approval Message is the warning or informative text that will be shown to the user before the action. This message provides an explicit response from the user to confirm the transaction.
Example
A grid form tool and a button tool have been added to the form. An action has been added to the button tool as shown in the image below.
Excel data is prepared to be imported into the grid form tool without headers containing column names.
Excel display
| The prepared Excel file should be saved in CSV format. It should be named in a way that does not contain Turkish and special characters. |
When the button on the client screen is clicked, the window for selecting the file from the computer opens.
In the window that opens, an excel file with .csv extension is selected and when the open button is clicked, excel data is filled into the grid tool.
Client view