cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
catialoures
Frequent Visitor

Retrieve the value from "[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":5,"Value":"Reporting"}]"

Hi All,

 

I'm trying to create a flow that runs every Monday at 10am. This flow, gets the items from a SharePoint list, filters it to Status = Open and then, I would like to send the results by email.

 

This is the chain of actions I've been using:

1 - Reccurrence: runs every Monday at 10am

2 - Get items: go to the list, filter it to Status = Open

3 - Create HTML Table: this is where things go wrong, I then receive the email, but the fields I chose come as "[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":5,"Value":"Reporting"}]" and I just want to select the actual "Value". I've tried using the expression item()?['Service']?['Value'] but Flow doesn't recognize it

4 - Send HTML by email

 

Can you help me out please?

 

Kind Regar

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @catialoures ,

 

I suspect that this field is allowed to be multiple-selected, so the output of this field is an array.

 

If you want to use the expression to get the value of this field, you should add array index to get the element, like item()?['Service'][0]['Value'].

 

If this choice filed is radio option, it is recommended that you could set this field to Radio Buttons, then you could use item()?['Service']?['Value'] directly to get field value.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-bacao-msft
Community Support
Community Support

Hi @catialoures ,

 

I suspect that this field is allowed to be multiple-selected, so the output of this field is an array.

 

If you want to use the expression to get the value of this field, you should add array index to get the element, like item()?['Service'][0]['Value'].

 

If this choice filed is radio option, it is recommended that you could set this field to Radio Buttons, then you could use item()?['Service']?['Value'] directly to get field value.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I have a similar problem and I have a question about step 2

 

2 - Get items: go to the list, filter it to Status = Open

 

I'am retrieving all the lines in one step and filtering in another.

Is it possible to use an equivalent odata expression to get only what I need? I want to filter based is an entry inside the object:

 
        "Status": {
        "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
        "Id": 5,
        "Value": "Execute"
        }
 
I want to do it all in the "get item" step, so I tried it with an odata filter expression like this :
 
         status.value eq 'Execute'
 
but doing the above fails. Would someone with more knowlege guide me please.
 
NHes
Frequent Visitor

I think you can now simply use the Value type dynamics field vs the Column type only like below:
MultiChoiceValue.png

Unable to process template language expressions in action 'Populate_a_Microsoft_Word_template_2' inputs at line '0' and column '0': 'The template language expression 'item()?['STATE'][0]['Value']' cannot be evaluated because property '0' cannot be selected. Object properties can only be selected by names. Please see https://aka.ms/logicexpressions for usage details.'.

Remove the 0 and it should work

 

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,842)