Create Custom Actions with SQL Editor in Datasources Module

In an application you develop with Kuika, you can create custom actions and use these actions on your screens. From the left menu of the Datasources module, you can view the data sources, actions and tables in the application you have developed, and add new data sources, actions and tables.

  1. After logging in to the Kuika platform, open the project you will work on from the “Apps” screen.
  2. In the “Datasources” (1) module, click on the “+” icon next to the “Actions” title on the left side.
  1. Select “New SQL Action” from the menu that opens.

If you want to create a new Custom Action in the Actions sub-panel, click on New SQL Action. If you want to create a new folder and create Custom Actions under this folder, click on New Folder and name and create your folder.

In an example scenario, let's say you want to create an action that lists the departments in the personnel list. Before creating this action, you need to create a table named “Department”. You can find detailed information about table creation in our content.

  1. Create a custom action named “Select Department List” to list the departments in your application.
  2. Write the SQL query required for the listing in SQL Editor. The query is created automatically for tables on the add query screen.
  3. To add a table-specific automatic query, click on the three dots next to the table name in the left menu. Kuika allows you to automatically add and modify “Select”, “Update” and “Delete” queries.
  4. You can use the following query to list the departments with the Select Department List special action:
Copyselect * from Department  WHERE DepartmentName LIKE @searchFor  OR @searchFor is null OR @searchFor = ''  ORDER BY DepartmentName
  1. After writing the query, test your query with the “TEST” button in the upper right corner and then create the custom action by clicking the “CREATE” button.
  2. You can view the action you created in the left panel, then edit, rename and delete it.
  3. To edit the action, hover over the action and click on the three dots that appear.
  1. Then select “Edit”.
  2. On the screen that opens, you can edit the existing SQL queries and update them by clicking on the “Update” button on the top right.
  3. Also, if you want to delete the action, click on the “Delete” option in the drop-down menu and complete the process.

Custom actions used in projects cannot be deleted without removing them from the modules or processes they are associated with and an error message may be displayed in this case.