Hi all. I have a bit of trouble by getting the value from af SharePoint dropdown list column. My flow i all in all simple, but it failes when I want to update a dropdown field with data from another dropdown field. I is the same data, so everything should be allright.
When I get the items, I make a filter array to get the items where claims from a person equals claims from another list. That works fine.
When I want to update the dropdown field I can only get the ID, not the value. I have tried several things, but cannot get it to work.
I har tried to insert this expression: items('Apply_to_each')['NettobeloebEllerProcent#Value'], but that does not work, it only works with items('Apply_to_each')['NettobeloebEllerProcent#ID'], but that only gives me the number, and not the actually value.
This is what I get in the body of my filter array:
"NettobeloebEllerProcent": {
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
"Id": 1,
"Value": "Nettobeløb"
And this is what I get from the body in the SharePoint list if I use #ID in the expression:
"NettobeloebEllerProcent": {
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
"Id": -1,
"Value": "1"
Can anyone guide me in the right direction?
THX in advance
/Frank
Denmark
Solved! Go to Solution.
Hello @venseben ,
the standard way to navigate a JSON is to use ['element']?['element2'] etc. therefore, I'd try to use:
items('Apply_to_each')['NettobeloebEllerProcent']?['Id']
or
items('Apply_to_each')['NettobeloebEllerProcent']?['Value']
Hello @venseben ,
the standard way to navigate a JSON is to use ['element']?['element2'] etc. therefore, I'd try to use:
items('Apply_to_each')['NettobeloebEllerProcent']?['Id']
or
items('Apply_to_each')['NettobeloebEllerProcent']?['Value']
Hi @tom_riha THX man, this is a live saver for me. I still had problems when performing the flow, I got the message
"The template language expression 'items('Apply_to_each')['NettobeloebEllerProcent']?['Value']' cannot be evaluated because property 'NettobeloebEllerProcent' doesn't exist"
I found that it was because the field was empty. As soon as the field had a value it worked like a charm. No I just have to find a way to avoid that error, so the flow can be completed. Have a mary christmas 🎄🎅
/Frank