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.
Properties
Name |
Description |
Mandatory |
---|---|---|
library |
The name of the solution data library you want to update. This will include a drop-down list of all |
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. First: operates on the first row only. Error: throws an exception if multiple rows are returned and the workflow does not resume. 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.
Example 1 - 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.
Example 2 - 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).
Example 3 - Upsert
Library – MasterLibrary
Operation – insert
Query – Name == 'John'
Onmultiple – all
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.
Example 4 - 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.