cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jmc2408
Regular Visitor

GET HTTP Body - Empty Object not coming through as null (or anything at all) using items() expression using SELECT Data Operation flow

I access data via a HTTP action to a REST API service.

 

The HTTP response has an object which mostly has and Item "ProjectManager" and properties (ID,Name) but this can be empty - depending if a user has updated this on our cloud service or not.

 

I have performed "Parse Json" to the HTTP Body and attempted to use a SELECT Data operation flow to map the response before eventual movement of this to SQL server, but I get the following error:

 

The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{ "Project_ID": "@item()['ID']", "Project_Manager_ID": "@item()['ProjectManager']['ID']", "Project_Manager_Name": "@item()['ProjectManager']['Name']" }' failed: 'The template language expression 'item()['ProjectManager']['ID']' cannot be evaluated because property 'ID' doesn't exist, available properties are ''. Please see https://aka.ms/logicexpressions for usage details.'.

 

 

Sample response as follows:

 

[
    {
        "ID": 71571,
        "ProjectManager": {
            "ID": 123,
            "Name": "John"
        }
    },
    {
        "ID": 71250,
        "ProjectManager": {}
    },
    {
        "ID": 21286,
        "ProjectManager": {
            "ID": 569,
            "Name": "Ben"
        }
    },
    {
        "ID": 81250,
        "ProjectManager": {}
    },
    {
        "ID": 41818,
        "ProjectManager": {}
    }
]
 
jmc2408_0-1611747190588.png

 

I've tried to follow a few of the suggestions others who have had a similar issue with, making changes to the auto generated schema etc but nothing has work.  I'm by no means an expert so hopefully someone has a few ideas I could try?
 
Thanks
0 REPLIES 0

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (3,575)