update
Last updated
Last updated
Updates the data from a dataset.
Name | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
The format used for filtering in the parameter filter
.
Key | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
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.
Key | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
The action performed if this function runs successfully.
The action performed if this function does not run successfully.
In this example, we will update the 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 fields, 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.update
function to the event flow and fill in the parameter. For the filter
and data
parameters, change it's type to a function / subflow.
For the filter
parameter, change it's type to a function / subflow and drag Conversion.toObject
to the subflow. Then add data
as an object key and change it's type to a function / subflow.
Drag the function Conversion.toObject
to the new subflow. Then add field
, operator
and value
as object keys with name
, like
, n%
as their values respectively.
For the data
parameter, it's type to a function / subflow and drag Conversion.toObject
to the subflow. Then add title
as an object key, with new value
as it's value.
The data should be updated with the changes passed. The result can be printed in the console using the Dataset.read and Log.write functions.
Refer to the example in Dataset.read for more information on viewing the data.
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
filter
The filters to be applied.
FilterFormat
-
-
No
data
Multiple dynamic attributes with values associated with each attribute.
Object
-
-
Yes
extra
The stored value that is passed to all the callbacks.
Any
-
-
No
operator
Query operators used to filter multiple times.
Text
And
Or, And
No
data
Set of rules for another group of queries.
List
-
-
No
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
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 updated data from the dataset.
List
Returns an error message.
Text