Set Column Plug-in

The Set Column plug-in allows you to set values in one or more solution field columns.

Notes: The Set Column plug-in works only for solution field columns on the Documents page. It does not work for columns on the Tasks page.

To rename a process, use the Title field in the plug-in. Example: [Title] = 'New Process' renames the process to 'New Process'.

Do not use the status column of a document to set a string value. If you need to set the status of a document, create a new solution field for the purpose of your business use case.

Properties

Name Description Mandatory

Expression

Indicates whether an expression will be evaluated.

 

 

Column Value Pair

This parameter is used to set the value in a Solution Field, e.g., [ColumnName] = value. The 'value' can be from a Form field or from a Solution Field, e.g., [Title] = [TestColumn] or [Title] = [/my:myFields/my:fieldValue].

Name – The name of the solution field for which a value needs to be set.

Value – The value which needs to be set in the form field.

Example:

Direct value: My Value

Value from form field: [/my:myFields/my:field2]

Value from solution field: [field1]

No

Note: Provide the Decimal Field value in single quotes when the decimal field column is used in a filter such as in Participant Resolvers, the Set Column plug-in, or in an External Data Connection.

Read-only columns

There are certain columns which are read-only and cannot be implemented.

The predefined, read-only column names for the Set Column plug-in are listed below. Values for these columns cannot be set using this plug-in.

  • TeamspaceId
  • FileId
  • TenantId
  • Version
  • CreatedBy
  • CreatedDate
  • ModifiedBy
  • ModifiedDate
  • ScriptStoreId
  • ScriptVersion
  • IsLatest
  • Locked
  • StoreId
  • SupportingDocs

Supported functions

Function Description

$Date

Sets a date value that is relative to the current date. The argument specifies the number of days to add to the current date.

$Format

Allows formatting of a column value with a standard .NET format string. .NET formatting strings are described in Microsoft documentation. The first argument is the format string, and the second argument is the name of the column to format.

$Expression

Can be set to "True" or "False". Default value is False.

Example: If the column is to be set to 2+3:

If the Expression parameter is absent or set to False (the default), the destination column will be set to 2+3 as a string.

If the Expression parameter is set to True, the destination column will be set to 5, (i.e., the expression used in the value will be evaluated).

$ListFields

This parameter sets a value in a column.

$Name

Invokes a name template and replaces the target column with the resulting name. The seed in this case is kept with the name template.

$RegExpExtract

Allows the Set Column plug-in to extract information from a column value and place it in another column. The first argument to the function is the quoted regular expression, and the second argument is the name of the field to apply it to. The regular expression runs on the value. The first back reference is extracted, and then placed into the target column.

$Revision

Invokes a name template and replaces the target column with the resulting name. The seed in this case comes from a column on the item.

$$Getvaluefromdataconnection

The value in a column can be set from data connections created in the solution. This takes arguments as follows:

  1. Connection Name: The Data Connection name which will contain the list of users to be assigned to swim lane. It includes a list of all the connections defined at the global level or current app level in a drop-down.
  2. Column: Name of the column in the Data Connection which will contain the list of users to be assigned to swim lane. The column can contain Username, DisplayName, Email, UserID or FirstName LastName of the user.
  3. Filter: Query to run to initially populate the potential workflow participants from which the users can be selected.
  4. RawQuery: Can be set to Yes or No. If set to Yes, the filter value along with the query will run as it is run in the database. If set to No, the query created by operators will be converted to a suitable format and then will be run in the database.
  5. Behavior: This can be set to First, Last, Merge, or Count.

    First: If multiple rows of data are returned from the data connection column , then the first value of the data connection will be updated in the column.
    Last: If multiple rows of data are returned from the data connection column, then the last value of the data connection will be updated in the column.
    Merge: If multiple rows of data are returned from the data connection column , then all the values returned from the data connection will be updated in the column as comma separated.
    Count: The count of the rows returned will be added.

Examples

Function Description

$Date(-2)

This example sets the target column to two days prior to the current date.

$Format('D', [MyDate])

This example formats the MyDate column in the long date format. For example, 12/31/2010 1:45:30 PM.

$Name([SelectedTemplate])

This example sets the target column to the next name template value defined by the contents of the column SelectedTemplate. If the SelectedTemplate column contains the value Project A Template, that will be the name template used to generate the value.

  • To use global-level name template (with the name MyGlobalNameTemplate), provide an input in the form: $Name(MyGlobalNameTemplate)
  • To use a Solution-specific name template (with the name MySolutionNameTemplate published with the solution name MySolution), provide the input in the form- $Name(MySolution:MySolutionNameTemplate)

$RegExpExtract('(\d{10}).*',[MyField])

$RegExpExtract(".*Document+([0-9]+).*",[MyField])

This example extracts the first ten contiguous set of digits from the MyField field.

This example extracts the number (of any length) after the word Document from the MyField field.

$Revision(MyTemplate:TemplateSeed)

This example generates a new name with the name template named MyTemplate with the seed in the TemplateSeed column.

[Review] – off

This example sets the Review column to the value off.

$$GetValueFromDataConnection(TestConnection,Name,[Col1]==2,First,false)

Sets a column value with the first value being the Name Column of the data connection.