This SharePoint designer workflow tutorial, we will discuss how to use dictionary workflow action in SharePoint 2013 designer workflow. Here, we will see how to build dictionary, loop through dictionary and get item from dictionary in SharePoint designer 2013 workflow.
SharePoint designer 2013 workflow dictionary
Dictionary variable type is new in SharePoint 2013 designer workflow. Dictionary variable can store different types of variables.
Suppose you want to store Employee Name (String type), Age (Integer type) & Date of Joining (Date type) then in SharePoint 2010 we have to create 3 variables of string, int & date type which can hold the employee data.
But in SharePoint 2013 we can build a Dictionary type variable which can store different type of employee data.
A SharePoint designer 2013 dictionary variable can support the following types:
- Boolean
- Date/Time
- Dictionary
- Guid
- Integer
- Number
- String.
In SharePoint 2013 designer workflow, Dictionary variable type has three different actions:
- Build Dictionary
- Count Items in a Dictionary
- Get an Item from a Dictionary
These workflow actions will be available under the Core Actions type.
First, insert a Build Dictionary action in the workflow. When you insert this action it will appear like below:
Click on this link to build the dictionary.
Once you click on this it will open a dialog box to build Dictionary. Then click on Add… to Add a Dictionary item. Once the dialog box will open it will ask you to give a name & Type and Value like below:
Once the build Dictionary is ready, you can then add “Count Items in a Dictionary” action to know how many items there in the Dictionary variable. Once you will add, it will appear like below:
You can click on the dictionary like to choose your dictionary variable name. The value will be stored in the Variable count.
Now, at last, we will use “Get an Item from a Dictionary” action to get value from the Dictionary variable. When you put this action, it will appear like below:
Click on an item by name or path to put the variable name or you can directly write variable name also like Name, Age or Salary. These are the variable names which we have created while building the dictionary.
And click on the Dictionary link to choose your Dictionary variable. It should look like below:
Here I have then just logged this information to the Workflow history list.
Your workflow looks like below:
You may like the following SharePoint workflow tutorials:
- Difference between workflows and event receivers in SharePoint 2013
- SharePoint designer workflow examples Create workflow using SharePoint designer 2013 video tutorial
- Calling Rest API from A SharePoint 2013 Designer Workflow
- SharePoint Site Workflow: Initiation forms parameters examples
- How to send an email using designer workflow in SharePoint Online
- Customize SharePoint 2013 list form using SharePoint designer 2013
- Install and Configure Workflow Manager for SharePoint 2016
This SharePoint tutorial, we learned how to use a dictionary variable in SharePoint 2013 designer workflow.
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