Saturday 11 August 2012

SharePoint Designer 2013 - Using Dictionary Actions


Dictionary is a new lind of variable (storage container) that can be used to save multiple values during the workflow. 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 have to create multiple stand-alone variables.

Since this will be widely used MS also Introduced three actions specifically designed for the Dictionary variable type.
  • Build Dictionary
  • Count Items in a Dictionary
  • Get an Item from a Dictionary

Build Dictionary - You use the Build Dictionary action to create a variable of type Dictionary. A Dictionary can contain any type of variable available in the SharePoint 2013 Workflow platform. The following list defines the variable types available:

  • Boolean: A Yes or No value
  • Date/Time: A date and time
  • Dictionary: A collection of variables
  • Guid: A Globally Unique Identifier (GUID)
  • Integer: A whole number without decimals
  • Number: A number that can contain decimals
  • String: A string of characters
In addition A Dictionary variable can contain a variable of type Dictionary.
Count Items in a Dictionary -  You use the Count Items in a Dictionary action to count the variables that a Dictionary contains and then store that number in an Integer variable. You can then use the item count to loop through the Dictionary.

Get an Item from a Dictionary -  You use the Get an Item from a Dictionary action to retrieve a variable stored in the Dictionary and place it in a variable. This is valuable when you need a value in the dictionary stored in a stand-alone variable. You can retrieve a value by entering the name of the variable.

Ads by Google

No comments:

Post a Comment