In this article, we will discuss a very common problem statement we faced while getting the value of particular column using Get Items action of MS Flow.
Error
The template language expression 'items('Apply_to_each')['Column_Name']' cannot be evaluated because property 'Column_Name' doesn't exist, available properties are '@odata.etag, ItemInternalId, ID, {Identifier}, {IsFolder}, {Thumbnail}, {Link}, {Name}, {FilenameWithExtension}, {Path}, {FullPath}, {HasAttachments}, {VersionNumber}'.
Please see https://aka.ms/logicexpressions for usage details.'
Why did MS Flow’s Get Items action not return column even if it is available in list?
This problem statement occurs when the column you're loading from does not have a value set for the item you were loading. Since there was no value, the Get Item action just didn't even return that column in the result.
Event if you create a separate view and give reference of that view in get items action as below, still it will not return the value of that column.
Resolution
When we get this error in Get Items action, we can use Send an HTTP request to SharePoint action of MS Flow.
In this action we can use REST API and specify which columns we need to return in result.
This action will return all columns specified in select parameter of REST API in Uri text box.
After sending an HTTP request to SharePoint, you need to use Apply to each action which will return all items in loop.
Here in the select output from previous steps text box, you can use the expression as below,
- Body(‘Send_an_HTTP_request_to_SharePoint’)?[‘value’]
So you will not need to parse output in JSON.
And then you can get the value of particular column in loop as below,
- Items(‘Apply_to_each_2’)?[‘column internal name’]
I hope this article will help you to resolve this issue of MS Flow.