The offline working feature on the Kuika platform allows the mobile application to run certain screens and data from the local database even when there is no internet connection.
Offline configuration consists of two steps:
Defining Offline Screens in the UI Designer module
Configuring Offline Tables in the Datasource module
Both modules must be configured for the offline scenario to work correctly.
Defining Offline Screens via UI Designer
The first step in the offline scenario is to determine which screen will open when there is no connection.
This is done in the UI Designer module.
Step 1: Open the Screen to Work Offline
Go to the UI Designer module.
Select the screen you want to open in offline mode.
Step 2: Define the Screen Role
Open the Properties tab in the right panel.
Find the Role field.
From the list that opens:
Check the Default Offline Screen option.
What Does the Default Offline Screen Do?
This role:
Opens automatically when the application has no internet connection.
Determines the main screen to be shown to the user in offline mode.
It should be the screen where offline tables are displayed.
If Default Offline Screen is not defined:
The application may display a blank screen when the connection is lost.
Offline Screen Definition Recommendations
This screen should be designed as simply as possible.
Only tables supported offline should be used.
Critical buttons (e.g., actions that call online services) should be disabled.
2. Configuring Offline Tables via Datasource
After defining the UI side, the tables to be used offline must be configured.
This is done in the Datasource module.
Step 1: Open the Table
Go to the Datasource module.
Enter the Managed DB → Tables area.
Open the table that will work offline.
Step 2: Enable the WORK OFFLINE Feature
Enable the WORK OFFLINE Toggle located at the top right.
When enabled, two options are available:
Schema Only
This option:
Creates the table in the offline database with only its structure.
It does not contain data.
Only the table schema exists in the offline environment.
Purpose of use:
If data will be written in the offline environment
If the data will be retrieved with the first synchronization
With Data
This option:
Moves the table to the offline database with both its schema and filtered data.
Data is downloaded to the mobile device according to the specified SQL criteria.
Example:
Select * FROM userguide WHERE UserId = @kuikauserid
Supported parameters:
@kuikauserid
@kuikausername
This filter ensures that each user downloads only their own data offline.
Enable Data Editing in Offline
If this option is enabled:
The user can update data offline.
When a connection is established, changes are synchronized to the server.
If disabled:
The offline environment operates in read-only mode.
Offline Workflow
The application launches.
The system checks for an internet connection.
If no connection is available:
The Default Offline Screen opens.
Offline tables are loaded from the local database.
If a connection is available:
The online data source is used.
Example Scenario
Scenario: The user should be able to view their own records offline.
Configuration:
UI Designer:
A list screen is created.
Role → Default Offline Screen is selected.
Data Source:
Table → WORK OFFLINE is active.
Data is selected.
Filter → @kuikauserid
Enable Data Editing is activated if necessary.
Result:
The user views their own data offline.
When online, the data is synchronized.
Important Notes
The primary key must be defined in the offline table.
Large data sets should not be taken offline.
Actions that call online services do not work on the offline screen.