Skip to main content
Nintex Community Menu Bar
Tutorial

Manually start a Nintex Workflow from SharePoint Online.


SimonMuntz
Nintex Employee
Forum|alt.badge.img+22

Use case

Nintex Workflow has SharePoint start events for new and updated items, but workflows must be manually triggered in some scenarios.

 

A Nintex Workflow can be created that accepts an item ID so it knows which item to operate on, but wouldn’t it be much easier to pass data and start a workflow on an item with just one click?

 

Solution

We begin by creating a new workflow with a form start event in Nintex Workflow.

To pass the ID of the SharePoint item to the start form, we take advantage of the getQueryStringParameter function.

We create a form variable and add a getQueryStringParameter function with a text parameter of “ID”

getQueryStringParameter("ID")
 

Alternatively, we can display the item ID on the form by setting the function as a default parameter for a form control.

 

SharePoint

To add the link to SharePoint, the modern view must be used.

We add a single line of text column to the list. From the column dropdown, we select Column settings > Format this column.

A panel opens to the left. We select the Format View option and then the advanced mode link at the bottom of the panel.

We paste the below JSON code, replace the URL with the form URL for the form created above, and click save.
 

{

  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",

  "elmType": "a",

  "txtContent": "Run Workflow",

  "attributes": {

    "target": "_blank",

    "href": "='https://tenantName.workflowcloud.com/forms/ad6e1613-03fc-43be-ae39-851adf6f5c68?ID=' + [$ID]"

  }

}

 

A link will appear in the column for each item.

When we click the link, our form opens, and the item ID is passed to it.

The ID can be used in workflow action conditions to target the SharePoint item if updates or other operations are required.

The same method can be used to pass any other data to the form if required.

 

Translate
Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings