Domanda

this is what I did so far:

  1. I'm using LookupSPListItem to get the current listItem out of the currentList.
  2. The Result value is of type DynamicValue.

enter image description here

So far so good.

But how do I access specific values inside the resulting DynamicValue variable? Unfortunately debugging my workflow doesn't work for some reasons... so I cannot have a look at the variable :(

I do not want to extract every single field on its own... that's too much work.

È stato utile?

Soluzione

To access specific properties inside DynamicValue variable depends on the JSON structure it has parsed. But for example if you had something as below:

{
 "d" : {
     "results" : [
           { "Title" : "Example1" },
           { "Title" : "Example2" } 
     ]
 }
}

You can access those using the GetDynamicValueProperty activity (type Microsoft.Activities.dynamicValue) with

PropertyName as "d/results(1)/Title"

Source as your dynamic variable

Result with the variable you want to save the output to.

With the above query it would return Example2. In your case the result will be 1 element array, so you can query for example ID using "d/results(0)/ID"

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top