Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Add Key/Value Pair

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

...

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:

Image Added

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.

Image Added


Execution:

Image Added






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:

Image RemovedImage Added

Parameters:

  • Input Collection (text box editor type) (type: List<KeyValuePair<string,string>>): the Input Collection . Specify the List of KeyValuePairs for the Add operationwhere the values will be sorted.
  • Order by Direction (text combo box editor type) (type: collection<collection<string>>, string, any collection type): 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.

...

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


Execution:

Image Added


  • 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:

    Image Added

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

      Image Added

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

      Image Added

      Image Added

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

    Image Added