When developing applications on the Kuika platform, you can create Custom Actions using SQL queries to increase the functionality of the application. These actions allow you to provide a dynamic experience to the user by customizing the functioning of your application. In this course, you will learn step by step how to create Custom Actions, integrate them into screens and apply them to elements.
This training content consists of the following topics:
In Kuika you can create custom actions and integrate them into your screens. In the Datasources module, you can view and manage existing data sources, actions and tables.
Description:
Objective: To create an action that lists the departments in the personnel list in the application.
SELECT * FROM DepartmentWHERE DepartmentName LIKE @searchFor OR @searchFor IS NULL OR @searchFor =ORDER BY DepartmentName;
You can create custom actions in Kuikada via UI Design or Datasources modules.
Steps:
Kuika allows you to quickly add basic SQL queries:
Example Command: “Create a query that lists only active departments.”
In Kuika SQL Editor, you can define variables with the DECLARE command.
DECLARE @variable_name data_type;
It's here,
1. Variable Definition and Data Assignment
DECLARE @top1Product nvarchar(256);SELECT TOP 1 @top1Product = productName FROM table_name;
2. Row Count Calculation
DECLARE @rowCount int;SET @rowCount = (SELECT COUNT(Id) FROM table_name);
Example Command: “Create a DECLARE command that lists only active departments.”
The following system parameters can be used when creating a SQL Action in Kuika:
Parameter | Description |
---|---|
@currentpage | Represents the page number. |
@pagesize | Determines the number of records returned per page. |
@kuikausername | Represents the name of the logged-in user on Kuika. |
@kuikauserid | Represents the user's identity (GUID). |
Using these parameters you can create paging, user-based data filtering and dynamic SQL queries. Especially when working with large data sets, you can optimize your queries by dividing the data into pages with @currentpage and @pagesize parameters .