Dictionary package
- Updated: 2023/02/03
Dictionary package
The Dictionary package contains actions that enable you to do various operations on dictionary-type values.
Dictionary data type
A dictionary is a collection of key-value pairs, in which each key has a value. It is similar to an entry in a dictionary, where each word has a corresponding definition or explanation. The key is similar to the word, and the definition or explanation is similar to its value. The properties of dictionary entries are as follows:
- Keys are unique within each dictionary variable. If you try to duplicate a key, you will overwrite its value.
- Key names cannot be changed.
- Keys are case-sensitive.
- Keys can contain leading and trailing whitespaces.
Each key-value pair in a dictionary is separated by a colon. The key-value pairs are separated from each other by commas. An example of a dictionary is as follows:
invoice = {'CustomerID': 9876, 'Location': 'XYZ', 'Amount': 12,34,567}
In the example, 'CustomerID', 'Location', and 'Amount' are keys, and the corresponding value assigned to each key is separated by a colon.
Working with variables of dictionary data type
A dictionary variable can hold values of boolean, number, or string data subtype. When initializing a dictionary variable, you can select the Any data subtype in order to hold any of the three data subtypes. You can manually enter values by creating a new variable or selecting an existing one from the Variables menu, and then clicking Add.
Use a dictionary variable to hold email or PDF properties.
- The dictionary variable retrieves a null value.
- The Get action retrieves a blank value.
Actions in the Dictionary package
Action | Description |
---|---|
Assign | See Assign action in Dictionary. |
Get | See Get action in Dictionary. |
Put | See Put action in Dictionary. |
Remove | See Remove action in Dictionary. |
Size | See Size action in Dictionary. |