SharePoint Designer 2013: Build Dictionary Action

Sign up for an Office 365 Developer Site

Be sure you have access to an Office 365 Developer Site. Here are three ways to get one:

  • Are you an MSDN subscriber? Visual Studio Ultimate and Visual Studio Premium with MSDN subscribers receive an Office 365 Developer Subscription as a benefit. Redeem your benefit today.

  • Do you have one of the following Office 365 subscription plans?

Office 365 Midsize Business Office 365 Enterprise E1, E3, E4, or K1 Office 365 Education A2, A3, or A4 Office 365 Government G1, G3, G4, or K1


If so, you can provision a Developer Site from the Office 365 admin center. For more information, see How to: Create a Developer Site within your existing Office 365 subscription.

  • You can either start with a free 30-day trial, or buy an Office 365 developer subscription (with one user license for either option) using one of the following links. This subscription costs $99.00 per year.

Please refer to Sign up for an Office 365 Developer Subscription and set up your tools and environment for more details.

Install SharePoint Designer 2013

SharePoint Designer 2013 is a free download. To download and install SharePoint Designer 2013 use the following procedure.

To install SharePoint Designer 2013

  • Open your web browser and navigate to the Microsoft Download Center.

  • Click on the Download button.


  • Select your platform type: 64-bit (x64) or 32-bit (x86). Click on the Next button.


  • Follow the instructions to install SharePoint Designer 2013.


Dictionary Variable

SharePoint Designer 2013 has a new variable type called Dictionary. The Dictionary variable type is a container designed to hold a collection of other variables.

The following list defines the variable types available:

  1. Boolean: A Yes or No value.

  2. Date/Time: A date and time.

  3. Dictionary: A collection of variables.

  4. Guid: A Globally Unique Identifier (GUID).

  5. Integer: A whole number without decimals.

  6. Number: A number that can contain decimals.

  7. String: A string of characters.

For example, your workflow might need to store more than just the name of the employee. It might also need to store his address and birth date. If you do not use the Dictionary variable you will need to create multiple stand-alone variables. This can quickly become difficult to organize and difficult to work with in the logic of the workflow. A Dictionary variable allows you to store multiple data points in a single variable.

I have created a simple custom list that has the following fields. In this article we will see how to use a Build Dictionary action and display the values in one of the fields (we will display it in the “Notes” field).


Workflow Design


The following is the output. 


Note: The dictionary variable value is stored in the notes field.

Connect to a SharePoint Online site in SharePoint Designer 2013

  • Open SharePoint Designer 2013.

  • Click on Open Site.


  • Enter the site URL and then click on the Open button.


  • Enter your credentials, if prompted. Be sure to use credentials that have access to the SharePoint 2013 site.

  • The site is opened successfully in the SharePoint Designer 2013.


Create a list workflow and add Build Dictionary action

  • Click on the Workflows link in the Navigation Pane.


  • Click on the List Workflow button in the interface and then click on the list to which the workflow should be added.


  • Enter the Name and Description for the workflow.


  • Select SharePoint 2013 as a platform type.

  • Click on the Ok button.

  • Click on the Action button in the ribbon interface and then click on the Build Dictionary action as in the following.


  • Click on the “this” link, a Build a Dictionary dialog box is opened.


  • Click on the Add button.

  • Add the dictionary items as in the following.



  • Click on the Ok button.

  • Add an “Update List Item” action as in the following.


  • Click on the “this list” link. An Update List Item dialog box is opened.


  • Click on the Add button and assign the value to the field.


  • Click on the Ok button.

  • Click on Transition to stage and then click on the Action button in the ribbon interface.

  • Click on Go to a stage.


  • Select End of Workflow.


  • Click on the Publish button in the interface.


  • The Workflow will be saved and published to the SharePoint 2013 list.


Test the Workflow

  • Navigate to the Office 365 developer site.

  • Navigate to the SharePoint list to which the workflow is added.

  • Click on the List tab and then click on Workflow Settings.


  • You will see the workflow has been added to the list successfully.

  • Navigate to the list and select an item.

  • Click on Workflows in the ribbon interface.


  • Click on List Workflow.


  • After a few minutes the workflow is completed successfully and the “Notes” field is updated with the dictionary value as in the following.


Summary

Thus in this article you saw how to use a Build Dictionary action in SharePoint Designer 2013.

Recent Posts

See All