Definition and Usage
This command retrieves all keys from a dictionary and stores them in a list variable. It allows you to extract and work with the keys separately from their associated values in a dictionary data structure.
Parameter Values
Input parameters
Parameter | Description | Possible Values | Required | Options / Notes |
Dictionary | Select or enter the dictionary variable from which you want to get the keys | Any dictionary variable | Yes | The input must be a valid dictionary object |
Error handling
Parameter Name | Description |
Throw error & stop | When an error occurs, the action will trigger an error and stop the execution of the entire app. |
Retry command | If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process. |
Ignore error & continue | When an error occurs, the action will be ignored, and the workflow will continue without interruption. |
Variables produced
This action produces a list variable containing all the keys from the input dictionary.
Using Variables in Conditions
You can use the {x} variable selector to reference existing dictionary variables as input. The output key list variable can be used in subsequent actions that require list processing, such as looping through keys or checking if a specific key exists in the dictionary.
Notes
The dictionary must be properly initialized before using this command; otherwise, an error will occur.
If the dictionary is empty, the resulting key list will be an empty list.
The order of keys in the output list is not guaranteed to match the order in which they were added to the dictionary.
This command is useful when you need to iterate through all keys in a dictionary or check for the existence of specific keys.