After creating the resource, you need to extract the data in the resource, select, filter, merge the data and then put it into the Inserts according to the logical requirements. We call this process of data processing an Action. Actions are the bridge between data and components and are an essential part of building an application. We have divided actions into two categories: actions and Transformers.
The process of using SQL actions is divided into the following steps:
- First, you need to find the action list in the app editor and click the “Add” button.
- Then, select a data source type in the resource select box. You can find the created resources in the corresponding resource list, you can also create new resources here. Select the created resource and click the “Confirm” button. An SQL action will be successfully created.
- The created action will be displayed on the action list. An action editor will be shown below the frame after kicking the action. You can change the resource of actions, write action statements, response content, add transformers, event handlers.
- After filling in the action list, you can click the “Preview” button to check whether the action you wrote is valid. The configuration panel will display the action result. After the action is edited, you can click “Save” button to end the process. If you switch to another action without saving the information, the system will prompt you to save the modification.
- Action: You can enter your action statements in the Action module where we have added the Code Mirror editor to enable action statement highlighting and code completion. In subsequent updates, we will provide a GUI input mode for writing action statements so that users unfamiliar with action statements can also complete data actions.
- Response: In the Response module, you can customise the conditions under which the action returns incorrect results, in such a way as to ensure the accuracy of the action.
- Advanced: Refine detailed settings for actions such as database timeout response times, event processor delays, etc. within the advanced options.
The process for actioning data using the API is similar to that for SQL.
- Firstly, the user needs to find the action list at the bottom left of the application editing page and click on the plus sign at the top right of the action list.
- Next, select the corresponding data source list in the resource selection box that pops up. You can find the created resource in the corresponding data source list, or you can create a new resource here. Select the created resource, click on “Create” and an API action will be created successfully.
- The successfully created action will be displayed in the Actions list in the bottom panel and the General tab for the action will pop up below the frame when clicked. You can make a request to any HTTP API in ILLA . Please see the APIs documentation for data request methods.
- Once you have filled in your action, you can click on the “Preview” button to see if the action you have written is valid and the configuration panel will give you the results. Once you have finished editing your action, you can click Save and exit to end the process. If you switch to another operation without saving, a popup will prompt you to complete the save operation.