Create collection or dictionary from Multiple selection

  • 10 August 2016
  • 2 replies
  • 1 view

Badge +3

Hi,

I have a field where I can have multiple selections.

GED_1.1_MultipleChoice.png

In the workflow it gives me a string as result of the selections:

{"results":[{"Id":70,"Value":"DR - ALSACE FRANCHE-COMTE"},{"Id":72,"Value":"DR - BRETAGNE"},{"Id":76,"Value":"DR - COTE D'AZUR"}]}

What would be the best way to convert this value "{"results":[{"Id":70....." in a collection or dicitionary? I can manipulate the string to do it but it would be good to have an action for this.

Thanks


2 replies

Userlevel 6
Badge +13

Comprehensive answer for you here

Userlevel 7
Badge +17

The answer is It's both. The result is in a dictionary who's tag is "results". Put the value in a dictionary variable then go get the collection value that is within. In your case you have a third thing going on here because the ID and Value is in play. So once you have a collection variable you then can get each item of the collection using the action by that name, or a For Each loop. In both cases, you need to store the each item of the collection into another dictionary variable. At this point you can then get the dictionary items using the keys ID and Value.

Reply