Help Center>Foundation Help

Applies to:

  • Winshuttle Foundation

Set Column plugin properties

The Set Column plugin allows you to set values in one or more SharePoint list columns.

On this page

Set Column plugin parameters table

Back to top

Value Pairs

Value pair parameters correlate to columns in the SharePoint list. When a form is published, a corresponding SharePoint list is created. This new list includes columns based on fields in the form that have been exported as form library columns in FormEx sites. In DocEx sites, the user must define custom SharePoint list columns.

NOTE: For site and list parameters, enter the site first, and then the list will be populated in the dropdown.

Value Pair

Description

list

The name of the SharePoint list to which you want to set the column.

site

The SharePoint site that contains the list to which you want to set the column.

column

The name of the column whose value you want to update. Add this parameter for each column you want to update.

query

The query parameters to search for a record listing in the SharePoint list. It will update only the first record in the result set of the query.

Note that the Query parameter does not work with the form field values; in other words, you can not specify an Xpath in the right-hand side of the query. For example, [Title] == @[//my:myFields/my:field1] will not work.

expression

The Expression parameter used to set the value to automatically route the form.

autocheckout

For SharePoint items which are configured to be checked out for editing (by default), we need to have an autocheckout parameter set to True when the property is changed using Workflow.

UseLinkedDocument

Yes: If UseLinkedDocument is set to Yes, the value will be set in the specified column of the linked document in the data file library. The Site, List, or Query parameters (if specified) will be ignored.

No: If UseLinkedDocument is set to No, its behavior is as follows:

  • If site, list, and query are specified, then the column value is set for the specified list.
  • If site, list, and query are not specified, then the columns value is set for the current Workflow process list item.

Creating a manually run operation

Back to top

  1. Set Uselinkeddocument to Yes
  2. Click Add.
  3. The Runner parameter should now be visible in the Plugin Arguments Editor.Set the name of the Runner in this parameter. (For SharePoint 2010 use the non-claims format, and for SharePoint 2013 use the claims format.)
  4. When the designated runner opens the data file from the Excel Add-in, the Run button should be visible. Clicking it will manually run the operation.

Note: In some cases, SharePoint items are configured to be checked out for editing. In such a case, if workflow updates a SharePoint column, the autocheckout parameter must be set to true.

Set Column plugin function list table

Back to top

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 Sharepoint 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 plugin 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 SharePoint column.

$Revision

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

Set Column plugin function examples

Back to top

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, then that will be the name template used to generate the value.

  • To use global level name template (with name 'MyGlobalNameTemplate') provide an input in the form: $Name(MyGlobalNameTemplate)
  • To use Solution specific name template (with name 'MySolutionNameTemplate' published with solution name 'MySolution') we need to 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 SharePoint column.

[Review] – off

This example sets the Review SharePoint column to the value off.

Example

  • site – http://acme.com/sv/FormEx
  • list – Employee
  • query – [Employee Name] == ‘Testuser’
  • [SharePointColumn1] - Value1
  • [SharePointColumn2] - Value2

This example queries the list Employee on the site http://acme.com/sv/FormEx for the row in which the Employee Name column matches ‘Testuser’.

If any rows are returned, it sets the SharePointColumn1 column to value1 and SharePointColumn2 to value2 in the first row of the SharePoint fields within the result set.