ILLA home page
  1. Action

Query

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.

SQL Action

Create action

The process of using SQL actions is divided into the following steps:

  1. First, you need to find the action list in the app editor and click the “Add” button.
  2. 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.
  3. 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.
  4. 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 Breakdown

  1. 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.
  2. Transformer: You can refine the action logic with JavaScript statements in the transformer, for example by using the filter function in JS instead of the where function in the action statement.
  3. Event handler: Event handlers allow you to trigger actions, control inserts and other actions in response to user interaction. You can add multiple event handlers to respond to an event without adding custom JavaScript statements. For example, when a user clicks a button, you can (1) trigger an action to run, while (2) resetting the state of multiple drop-down lists and text inputs.
  4. 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.
  5. Advanced: Refine detailed settings for actions such as database timeout response times, event processor delays, etc. within the advanced options.

API Actions

Create action

The process for actioning data using the API is similar to that for SQL.

  1. 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.
  2. 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.
  3. 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.
  4. 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.

Action Breakdown

  1. Transformer: You can refine the action logic with JavaScript statements in a transformer, for example by using the filter function in JS instead of the where function in an action statement.
  2. Event handlers: Event handlers allow you to trigger actions, control inserts and other actions in response to user interaction. You can add multiple event handlers to respond to an event without adding custom JavaScript statements. For example, when a user clicks a button, you can (1) trigger an action to run, while (2) resetting the state of multiple drop-down lists and text inputs.