read
Last updated
Last updated
Reads the data from a dataset.
Name | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
Will contain a single object, or a list of one (1) or more objects which consist of:
Key | Description | Input Type | Required |
---|---|---|---|
Will contain a single object, or a list of one (1) or more objects (JoinFormat) which consist of:
The format used for filtering in the parameter filter
.
The format for the parameter data
in FilterFormat. Will contain a list of one (1) or more objects with the following structure (dataset, operator, value) and contain zero (0) or more objects with the same structure (FilterFormat only). This can be another FilterFormat to create grouped queries.
Will contain a single object, or a list of one (1) or more objects which consist of:
The action performed if this function runs successfully.
The action performed if this function does not run successfully.
In this example, we will read Local Table
data from the local storage.
Create a Local Table
in the services panel in the service page if there is no table created yet. For the field, add name
and title
as object key with Text type.
Drag a button component to a page in the mobile designer.
Select the event press
and drag the Dataset.read
function to the event flow and fill in the parameter.
Drag a Log.write
as Dataset.read
callback and use input on it's value param type.
The data should be displayed in the console.
Key | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
Key | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
Key | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
Key | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
Description | Output Type |
---|---|
Key | Description | Output Type |
---|---|---|
Description | Output Type |
---|---|
Description | Output Type |
---|---|
dataset
The name of the dataset that is created in Services.
Text
-
-
Yes
fields
The fields to be selected from the dataset. If left blank, all fields will be selected.
Object / List
-
-
No
join
The join filters to be applied.
Object / List
-
-
No
filter
The filters to be applied.
FilterFormat
-
-
No
sort
The order to sort the records by.
Object / List
-
-
No
limit
The number of records to be returned.
Number
15
-
No
page
The pagination number.
Number
-
-
No
extra
The stored value that is passed to all the callbacks.
Any
-
-
No
dataset
The dataset to select fields from. The default value for the dataset will be the main dataset selected in the �dataset� parameter.
Text
No
field
The attribute (field) to be selected.
Text
Yes
title
The new title (alias) of the field.
Text
No
type
The type of table join to execute.
Text
Inner_Join
Inner_Join, Left_Join, Right_Join
Yes
dataset
The dataset to join to the main dataset. The default value for the dataset will be the main dataset selected in the �dataset� parameter if left empty.
Text
-
-
No
filter
The filters to be applied.
FilterFormat
-
-
Yes
operator
Query operators used to filter multiple times.
Text
And
Or, And
No
data
Set of rules for another group of queries.
List
-
-
No
dataset1
The dataset to filter or compare with another dataset.
Text
-
-
No
field1
The field in the first table to be filtered.
Text
-
-
Yes
dataset
The dataset to filter.
Text
-
-
No
field
The field to be filtered.
Text
-
-
Yes
operator
Operators to be used for specific filtering.
Text
-
Equal, Not_Equal, Is_Null, Is_Not_Null, Greater_Than, Greater_Than_Or_Equal, Less_Than, Less_Than_Or_Equal, Like, Not_Like, In, Not_In, Between, Not_Between
Yes
value
The value to perform the query, which depends on the operator.
Any
-
-
No
dataset2
The dataset to compare with the first dataset.
Text
-
-
No
field2
The matching field in the second table to be filtered.
Text
-
-
Yes
dataset
The dataset to sort. The default value for the dataset will be the main dataset selected in the �dataset� parameter.
Text
-
-
No
field
The attribute (field) of the dataset to sort.
Text
-
-
Yes
order
The order to sort the rows in the field by.
Text
Ascending
Ascending, Descending
No
Returns the formatted information.
Object
success
Boolean value to denote whether the function was executed successfully.
Text
message
The message to print.
Text
data
Any additional message or data to print.
Text
Returns the list of data read from the dataset.
List
Returns an error message.
Text