Update Solution Data Library Plug-in

The Update Solution Data Library plug-in allows you to insert, update, or delete items from a Solution Data Library.

Solution field values

If the value for a solution field (apart from the string type field) is not provided by the user or is empty for other reasons, a null value is saved by default for these fields. These fields can be queried using “null” value. See the table below for default values for each data type.

Data Type Default values (Evolve 20.0) Default Values (Evolve 20.1 and later)
Int 0 null
Decimal 0.0 null
Date 1900/01/01 null
Boolean False null
Text/String Blank string Blank string

If a solution field is mapped to a calculated field in the Solution Data Library, Solution Developers receive a warning message and the value for that field is not pulled from the form (is not saved). The solution field value is ignored and the calculated column uses the value from the formula. This also applies when a calculated field is mapped to a property promoted solution field.

Properties

Name

Description

Mandatory

SolutionDataLibrary (former name: list)

The name of the solution data library you want to update. This parameter includes a drop-down list of the solution data libraries created at the global or current app levels.

Yes

operation

The action you want to perform. Possible values for this operation are:

Delete: Deletes an existing row(s) from a solution data library.

Insert: Inserts new row(s) in a solution data library.

Update: Updates existing item(s) in a solution data library.

Upsert: Inserts a new row into a solution data library when there is no row; updates an existing row.

Yes

query

The query parameters used to search for rows in the solution data library.

Example:

Direct value: Title == 1 (here Title is a column in Solution Data Library)

Title == [field1] (here Title is a column in Solution Data Library and field1 is Solution field)

Title == [/my:myFields/my:field2] (here Title is a column in Solution Data Library and field2 is form field)

Title == NewTitle (Here both Title and NewTitle are columns in Solution data library)

No

onmultiple

Defines what you want the Operation to do if multiple items (rows) are matched with the query.

Note: Note:  The first and all values of the Onmultiple property (just below) are valid for the Update and Delete operations. The first and error values of the Onmultiple property (just below) are valid for Upsert operations.

The values are:

First: The first option operates on the first record from the result set; this is the first record that was added - the oldest record.

Error: Throws an exception if multiple rows are returned and the workflow does not resume. Error message will look as follows: The query '[Age] == 21' returned multiple items. Where [Age] == 21 is a query mentioned in query parameter.

All: Performs the defined operation on all items/rows.

No

Note:

If a direct value is used in a query, string values must be added in single quotes.

Examples

Insert

Library – MasterLibrary

Operation – Insert

This example will insert the values from Solution Fields (which exist with same name in Solution Data Library) to the Solution Data Library named MasterLibrary.

Update

Library – MasterLibrary

Operation – update

Query – Name == 'John'

This example will update the values for all the records which have the value ‘John’ in the ‘Name’ column of Solution Data Library ‘MasterLibrary’-- with the values in Solution Fields (which exist with same name in Solution Data Library).

Upsert

Library – MasterLibrary

Operation – insert

Query – Name == 'John'

This example will look for value ‘John’ in the ‘Name' column of Solution Data Library ‘MasterLibrary’. If the record exists, it will update those with the values in the Solution Fields (which exists with same name in Solution Data Library). If the record does not exist, it will insert the values from Solution Fields (which exists with same name in Solution Data Library) to the Solution Data Library with name MasterLibrary.

Delete

Library – MasterLibrary

Operation – delete

Query – Name == 'John'

Onmultiple – first

This example will look for value ‘John’ in the ‘Name' column of Solution Data Library ‘MasterLibrary’ and will delete the first occurrence of the same.