none
MIMWAL Powershell Hashtable Return Issue RRS feed

  • Question

  • Hi,

    I have a powershell script that returns an HashTable that needs to be consumed by later workflow activities. The HashTable contains key/value pair that are both object ids. I need for a way to iterate through the Hashtable to store the key/value in a different object's multi-value reference types.

    Microsoft's example of "Table of Values" shows that you can access the hashtable by key but in my case I do not know the key name. How do I iterate and access the Hash table key/value.

    Thanks.

    Thursday, April 12, 2018 3:09 PM

Answers

  • If you don't have a need for a well defined key name, you can simply return a list of suitably concatenated key-value pairs. You can iterate over the list and split the current item get back key and value individually.
    Thursday, April 12, 2018 3:51 PM
    Owner

All replies

  • If you don't have a need for a well defined key name, you can simply return a list of suitably concatenated key-value pairs. You can iterate over the list and split the current item get back key and value individually.
    Thursday, April 12, 2018 3:51 PM
    Owner
  • Thanks. I thought about this and brings me to another question. What I am trying to do is group value based on the key ObjectID(s). A value could be concatenated list 100's of ObjectID's and so could the key. Is there any performance impact (of storing such a large value in WorkflowData) of such a concatenation of key/value pair?
    • Edited by SedonaIAM Thursday, April 12, 2018 4:07 PM
    Thursday, April 12, 2018 4:00 PM
  • Concatenation in itself won't have any performance impact. The impact will depend on how many items are in the list that you have to iterate over and how many individual MIMService request that are going to be issued as a result of complete workflow.
    Thursday, April 12, 2018 4:16 PM
    Owner
  • Thanks.  I wonder why Microsoft does not provide better support for hastables (and nested hashtables) in terms of access with workflow data.
    Thursday, April 12, 2018 4:57 PM