Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 7 Current »

Add Key/Value Pair

This activity adds a KeyValue Pair element to a specified List.

Activity Parameters

The Add Key/Value Pair activity parameters can be provided by manual inserted values or via IN arguments or variables:

Parameters:

  • Input Collection (text box editor type) (type: List<KeyValuePair<object,string>>): the input Collection, where the new values will be added. It can be a new collection or one with existing values.
  • Key (text box editor type) (type: string): the value for the Key item.
  • Value (text box editor type) (type: string): the value for the Value item.

The Read Only Output variable are the possible output values that the activity will provide:

  • Output Collection (type: List<KeyValuePair<object,string>>): outputs the resulting List of KeyValuePairs.




Execution and activity usage:

  • the activity requires an existing collection where the values will be added. This collection can be empty or one with already added values. For example, define a variable in the Variables area, with List<KeyValuePair<string,string>> type:



  • during the execution, the activity will insert the value seen in the Key field for the list's Key item, and the value seen in the Value field for the list's Value item
  • the activity will output the new collection, which will contain the newly added values. The output collection can be iterated using a ForEach activity and the results displayed using Log Track Data activities:



    • For Each: takes as input the OutputCollection from the Add Key Value Pair activity:



    • Log Track Data activities can output values for Key and Value items:





  • The results will be displayed in the Track Data area:






Get Key/Value Pair

This activity gets a Key/Value Pair element from a specified collection.

Activity Parameters

The Get Key/Value Pair activity parameters can be provided by manual inserted values or via IN arguments or variables:

Parameters:

  • Index (text box editor type) (type: string): the index value for which the Key And the Value items will be retrieved. In the screenshot above the 0 index is used, which means that the activity will return the first position from the input collection.
  • Input(text box editor type) (type: List<KeyValuePair<string,string>>): the Collection where the values will be taken from. Most common collection types are the following: List<KeyValuePair<string,string>>, Collection<KeyValuePair<int,object>>, Dictionary<string,string>. In the example above the output from an Add KeyValuePair activity was used.
  • Key (text box editor type) (type: string): specify the key for which the value should be retrieved. If this parameter is used, the Index field will be ignored.

The Read Only Output variable are the possible output values that the activity will provide:

  • Key (type: object): outputs the Key for the retrieved Key/Value Pair.
  • Value (type: object): outputs the Value for the matching Key.


Execution:






Sort Keys/Values Pairs

This activity sorts a list of KeyValue Pairs.

Activity Parameters

The Sort Keys/Values Pairs activity parameters can be provided by manual inserted values or via IN arguments or variables:

Parameters:

  • Input Collection (text box editor type) (type: List<KeyValuePair<string,string>>): the Collection where the values will be sorted.
  • Order by Direction (combo box editor type) (type: string): choose to order the resulted rows in ASC or DESC direction.
  • Sort After (text box editor type) (type: string): specify whether to sort after Keys or Values.

The Read Only Output variable are the possible output values that the activity will provide:

  • Output Collection (type: List<KeyValuePair<string,string>>): outputs the resulting List of KeyValuePairs.


Execution:


  • the activity will output the new collection, which will contain the sorted values. The output collection can be iterated using a ForEach activity and the results displayed using Log Track Data activities:



    • For Each: takes as input the OutputCollection from the Sort Key Value Pair activity:



    • Log Track Data activities can output values for Key and Value items:





  • The results will be displayed in the Track Data area:

  • No labels