Platform Execute code

Platform Execute code

The workflow «Platform Execute Code» allows to use additional functions to implement the logic of workflow processes.

Add the «Platform Execute Code» action and go to its settings in the workflow designer. In the form that opens, the following options are available:

 

  • Function Name. Allows you to select the function you need to perform:
  • Start Nintex workflow;
  • Copy attachments;
  • Operation with a list of policy confidentiality;
  • Request delegates;
  • Edit values of fields «Created by» and «Modified by»;
  • Add users to User or group field;
  • Calculate difference between two dates;
  • New task notification email;
  • Sets reference to parent document;
  • Getting a list of loggins in the form of string;
  • Return relative list url;
  • Create Folder;
  • Get Url of folder with child items;
  • Receiving html-links to files in details field;
  • Ensure detail folder;
  • Calculation of the pattern value;
  • Get Login Name.
  • Parameters. The set of input parameters is determined for each function.
  • Store result in. Allows you to specify a variable to save the result of the function.


Allows you to run the specified workflow on a list item. When selecting the «Start Workflow» function, you need to fill in the parameters:

  • List URL. Allows you to specify a relative URL to the list containing the item on which the process will be launched (List/CustomList).
  • Item ID. Allows you to specify the numeric identifier of the item on which the process will be launched.
  • The name of the workflow to be started. Allows you to specify the name of the workflow to be started.


Allows you to copy attachments to an item in another list. When selecting the «Copy attachments» function, you must fill in the parameters:

  • Source List URL. Allows you to specify a relative URL to the list containing the source item (List/CustomList).
  • Source item ID. Allows you to specify the numeric ID of the item whose attachments you want to copy.
  • Source Table Field name. Allows you to specify the internal name of the field of the Details List, the attachments from which you want to copy.
  • Recipient List URL. Allows you to specify a relative URL to the list containing the item receiver (List/CustomList).
  • Recipient item ID. Allows you to specify the numeric ID of the item to which you want to copy attachments.
  • Recipient Table Field name. Allows you to specify the internal field name of the Details List to which you want to copy attachments.
  • Is remove existing attachments. Defines the behavior when copying attachments to an item that already contains attachments. If the parameter is set to «True», then the existing attachments will be deleted.


Allows you to change the list of users or user groups stored in a multi-line field. When choosing the «Operation with a list of policy confidentiality» function, you need to fill in the parameters:

  • Item ID. Allows you to specify a numeric identifier for an item that contains a multi-line privacy list field.
  • Switch operation on/off. Specifies on/off action execution. If the parameter has the value «No» (or «False»), then the action will not be executed.
  • Name of field. Allows you to specify the internal name of the field type «Multiple lines of text».
  • List ID or list URL. Allows you to specify a relative URL to the list containing the item, or the list ID (Lists/CustomList or dee5de90-5f13-4c81-97b5-66b19900cb73).
  • Type of operation. Allows you to define the type of operation for the privacy list:
  • Add. Adds to the list of privacy users or user groups specified in the parameter «User Names».
  • Remove. Removes from the list the privacy of users or a group of users specified in the parameter «User Names».
  • RemoveAll. Clears the privacy list..
  • User names. Allows you to specify user accounts or groups to add or exclude from the list.


Allows you to get a list of users specified as delegates on the settings page for delegation rules. When choosing the function «Request delegates» you need to fill in the parameters:

  • Whose delegates are being searched. Allows you to specify the user accounts for which you want to define delegates.
  • Include specified users in the result. Determines whether the users specified in the «Whose delegates are being searched» parameter will be added to the search result.
  • Use recursive search  (relevant if there are several levels of delegation: from user A to user B, from user B to user C, etc.). Determines whether to perform a recursive search among delegates. If the parameter is set to «True», then all delegates in the hierarchy will be included in the search result. If the parameter is set to «False», then only the first level delegate will be included in the search result.


Allows you to change the values ​​of the «Created by» and «Modified by» system fields in the list item. When choosing the function «Changing the fields «Created by» и «Modified by», you must fill in the parameters:

  • List URL. Allows you to specify a relative URL to the list containing the item in which you want to change field values ​​(List/CustomList).
  • Item ID. Allows you to specify the numeric identifier of the item in which you want to change the field values.
  • User Login (Created by). Allows you to specify the account to which you want to change the value in the «Created by». If the parameter is empty, the change will not be performed.
  • User Login (Modified by). Allows you to specify the account to which you want to change the value in the «Modified by» field. If the parameter is empty, the change will not be performed.


Allows you to add users to the «Platform: Person or Group» type field. When choosing the function «Add users to User or group field» you need to fill in the parameters:

  • List URL. Allows you to specify a relative URL to the list containing the item in which you want to change the field value (List/CustomList).
  • Item ID. Allows you to specify the numeric identifier of the item in which you want to change the value of the field.
  • User or group field. Allows you to specify the internal name of the field type «Platform: Person or Group», to which you want to add users.
  • Values ​​to add. Allows you to specify user accounts that you want to add to the field.
  • Maximum update tries. Allows you to specify the maximum number of attempts to update an item.


Allows you to calculate the difference between dates in days with the possibility of excluding weekends and holidays. When choosing the function «Calculate difference between two dates» you need to fill in the parameters:

  • Begin date. Allows you to specify the start date of the period.
  • End date. Allows you to specify the end date of the period.
  • Exclude vacations. If the parameter is set to «True», then holidays will not be taken into account when calculating the difference between dates. To do this, you need to configure the calendar of holidays in the management of the list of holidays («Site Settings» → «Manage holidays»).
  • Exclude non-working days. If the parameter has the value «True», then holidays will not be taken into account when calculating the difference between dates. To do this, you need to define the working week in the regional settings of the site («Site Settings» → «Regional settings»).


Allows you to send notifications of overdue tasks with LazyApproval functionality. When choosing the function «New task notification email» you need to fill in the parameters:

  • Email body. Allows you to specify the text that will be contained in the body of the notification of the task. The text is pre-formed in the workflow format html-markup.
  • Send Email to. Allows you to specify the users to whom the task notification will be sent.
  • Email subject. Allows you to specify the title of the letter with the task notification.
  • Task completion key. Allows you to specify a task completion key using LazyApproval.
  • Possible results of task. Allows you to specify options for completing a task using LazyApproval. Options must be specified in the form of text, separated by “;”. These options will be available on the notification form as buttons.
As the values ​​of the «Email body», «Send Email to», «Email subject», «Task completion key» parameters of this function, you must specify the variables defined in the workflow.


Allows you to set in the «Master item» field of the child item a link to the parent list item (to the item on which the workflow is running). When choosing the function «Sets reference to parent document», you must fill in the parameters:

  • List relative url. Allows you to specify a relative URL to the list containing the child item in which you need to fill in the «Master item» field (List/CustomList).
  • Identifier of list item. Allows you to specify the numeric identifier of the item in which you want to fill in the «Master item» field.


Allows you to get a list of loggins as a text string from the specified field. When choosing the function «Getting a list of loggins in the form of string» , you need to fill in the parameters:

  • List field name. Allows you to specify the internal name of the field type «Platform: Person or Group».
  • Site-relative list URL. Allows you to specify a relative URL to the list containing a field of type «Platform: Person or Group» (List/CustomList).
  • List item ID. Allows you to specify the numeric identifier of the item containing the field type «Platform: Person or Group».


Allows you to get the relative address of the list. When choosing the function «Return relative list url», you need to fill in the parameters:

  • List item url. Allows you to specify the absolute URL of the item for which you want to get the relative address of the list.


Allows you to create a folder in the specified Details List. When choosing the «Create folder» function, you must fill in the parameters:

  • Detail list URL. Allows you to specify a relative URL to the list, a Details List (List/CustomList).
  • Parent item Id. Allows you to specify the numeric identifier of the item in which you want to create a folder of the Details List.


Allows you to get the URL of a folder with child items. When choosing the function «Get Url of folder with child items» you need to fill in the parameters:

  • Parent item list URL. Allows you to specify a relative URL to the list containing the master item (List/CustomList).
  • Parent item ID. Allows you to specify the numeric ID of the master item.
  • Detail list field name. Allows you to specify the internal name of the field type «Platform: Details List».


Allows you to get html-links to files of the field type «Platform: Details List». When choosing the function «Receiving html-links to files in details field», you need to fill in the parameters:

  • Absolute URL for using in links. Allows you to specify the absolute URL of the site to be used in the links. It is recommended to use an external constant instead of a workflow variable or an explicit value.
  • Parent item list URL. Allows you to specify a relative URL to the list containing the master item (List/CustomList).
  • Parent item Id. Allows you to specify the numeric ID of the master item.
  • Detail list field name. Allows you to specify the internal name of the field type “Platform: Details list”.
  • Separators for links. Allows you to specify a character that will be separated links (Example: “< /  br >“).


Allows you to connect the Detail list of the folder with the field «Platform: Details List». When choosing the function «Ensure detail folder» you need to fill in the parameters:

  • Parent item list URL. Allows you to specify a relative URL to the list containing the master item (List/CustomList).
  • Parent item ID. Allows you to specify the numeric ID of the master item.
  • Detail list field name. Allows you to specify the internal name of the field type «Platform: Details List».


Allows you to generate a value in the «Platform: Calculated» type field according to the pattern specified in the field settings. When choosing the function «Calculation of the pattern value» you need to fill in the parameters:

  • List URL. Allows you to specify a relative URL to a list containing a field of type «Platform: Calculated» (List/CustomList).
  • Item ID. Allows you to specify the numeric identifier of the item that contains the field type «Platform: Calculated».
  • Name of the field of type «Platform: Calculated». Allows you to specify the display name of the field type «Platform: Calculated».
  • Update the value of the field «Platform: Calculated». Determines the behavior when forming the value in the «Platform: Calculated» field. If the parameter has the value «True», then the value in the field will be updated.
To use the function of calculating the value of a pattern in the settings of the «Platform: Calculated» field, the «Enable value calculation» parameter must be «No», and for fields added to the template, the update mode must be set to «2».


Allows you to get the Login name by its ID. When choosing the function «Get Login Name», you need to fill in the parameters:

  • In the «Platform Execute Code» workflow action, it is possible to save information about the error that occurred. Using the «Error handling» block, the workflow designer can intercept errors that occur during the execution of an action and create custom error-handling logic. To do this, select «Yes» in the «Capture errors» drop-down list and specify the variable to which the error text will be saved.

Contents