Use variable from main process in subprocess

From SMTX Wiki
Revision as of 12:07, 31 January 2023 by Smtxwiki (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Insert a step of the type 'Execute Javascript' Run this script:

Note: enter the name of the variable of the main proces where is says: VARIABLENAMEHERE


var url = #REPLACE-STEP-LINKONLY#; var processInstanceId = +url.split('processInstanceId=')[1].substr(0,6); return WorkflowInterface.getVariableValue(processInstanceId, 'VARIABLENAMEHERE');


example: https://ssp.valid.nl/Workflow/Admin/ProcessAddEdit.aspx?genericid=387