I'm interested in looping through each record and working with the Value, and the PartitionKey. I can get the Value okay, but if I set my For Each Apply to body('GetVisitsInAWeek')['PartitionKey'] I get the error:
InvalidTemplate. Unable to process template language expressions for action 'Apply_to_each' at line '1' and column '2526': 'The template language expression 'body('GetVisitsInWeek')['PartitionKey']' cannot be evaluated because property 'PartitionKey' doesn't exist, available properties are 'odata.metadata, value'. Please see https://aka.ms/logicexpressions for usage details.'.
I'm not sure how to get the PartitionKey, and furthermore, how to do a For Each Apply loop and work with both the Value AND the PartitionKey within the same loop.
Could you please choose a "Value" dynamic content of the "GetVisitsInWeek" action in the input field of the "Apply to each"?
Please delete the "PartitionKey" dynamic content from the in the input field of the "Apply to each", and choose the Array type value in the input field of the "Apply to each", and then you could refer to screenshot below to add Compose action inside the "Apply to each" to get the "PartitionKey" value:
Thanks Alice - I’ll give this a try when I’m at work tomorrow. Out of curiosity, how would you propose someone would get both the PartitonKey AND a custom Column value from the table in the flow above? Let’s say I wanted the PartionKey and the Value field within the apply for each loop?