In this post, we will discuss how to use Query List Nintex workflow action for Office 365 Online. Apart from this, we will also see how to use For Each, Get-Item From Collection Nintex workflow actions.
Query List Nintex workflow action for Office 365
In this demo, we will see how we can query a SharePoint list data, and by using For each and Get Item from Collection we will log into the history list.
If you are new to Nintex Workflow for Office 365, read Step by Step Nintex Workflow tutorial for Office 365 SharePoint Online.
Nintex Workflow Query List action helps us to query data from a SharePoint Online list in the current site. In this case, we will create a site workflow using Nintex Workflow for Office 365.
To Create a Site Workflow, go to your SharePoint Online Site Contents page. Then click on the Nintex Workflow for Office 365 app on that page. This will open the Nintex workflow Gallery.
Here click on the Create New Site Workflow button which will open your workflow designer.
In the workflow actions section, search for Query List workflow action. Drag and drop a Query List action to the workflow. Then search for a For Each action and then drag and drop down to Query List action.
After that Drag and drop Get Item from Collection inside for each loop in Nintex Workflow for Office 365. Then add one Log to History List action into the site workflow.
So now your Nintex workflow should look like below:
Then we need to add a few variables like a blow, either you can create form the Variables button in the ribbon or you can also create while configuring each step.
Now we will configure each action. Double click on Query List workflow action to open the configure dialog box. First, select the List name from where you want to query data.
Here I have chosen Editor mode as Query builder and choose the option to show all items. At the same time, you can also add some filter criteria. Then Sort based on a column.
Then you can choose Maximum number rows to show at a time (default value 100).
- Output Type: There are two options for output.
- Single output: Outputs all selected columns to a single collection variable.
- Separate output per column: Outputs each selected column to its own collection variable.
Then we can select the columns we want to select. Then set the Output to a collection type variable which we have created earlier or you can create a new variable of a collection type.
Then in Result count select a variable of type Integer. This will store the number of results returned from the Query. It should look like below:
Then double-click on the For Each loop. Then:
- Input dictionary or collection: Choose the collection variable.
- Output value: Choose the single line text variable which will store the value of the variable item accessed from the dictionary or collection variable.
- Output index: Select the integer variable for storing the index of the collection variable item.
It should look like below:
Then double-click on Get Item From Collection workflow action to open the configuration wizard. Choose the target collection as ItemCol variable. Index choose the MyItemIndex variable.
The Output variable chooses myItemTitle variable. This variable will store the retrieved item.
Then double-click on the Log To History List workflow action as shown in the fig below, Here choose myItmeTitle variable.
It should look like below:
Now Publish the workflow which we have just created using Nintex Workflow for Office 365. Since this is a site workflow.
To run the workflow, go to the Site Contents page, Then click on Site Workflows link. It will show you all the workflows, Click on the workflows to run the workflow.
Once the workflow runs successfully completed., you can see the history list, all the items are listed.
You may like following Nintex Workflow for Office 365 tutorials:
- Nintex workflow examples: Copy Document, Translate Document and Web Request Workflow actions in Nintex for Office 365
- How to use Start a Task Process Action in Nintex Workflow for Office 365 SharePoint Online
- Document Approval Workflow in Nintex Workflow for Office 365 SharePoint Online
- Nintex Workflow for office 365: Create a user in Office 365 and Add User to SharePoint Group
- Create SharePoint Site Collection and Site using Nintex Workflow for Office 365
- Assign A Task Action in Nintex Workflow for Office 365 SharePoint online
- How to use App Step Nintex Workflow Action in SharePoint Online Office 365
- Nintex Yammer create group workflow action for Office 365 SharePoint online
I hope this Nintex workflow helps to use Query List Nintex workflow Office 365 actions in SharePoint Online. Then will tell you how to use For Each, Get-Item From Collection Nintex workflow actions in SharePoint Online Office 365.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com