web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApp cuts off an A...
Power Apps
Answered

PowerApp cuts off an API response

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I am working with a Custom Connector to an API. On a GET (all) call, I get info back from the API. The info is not consistent. About 25% of items in the response have the field that I want. The other 75% of the items do not have the field that I want. That is to say that the item does not have that key at all.

 

For example, I want "thingId":

25%

"name": "something",

"thingId": "123",

"type": "text",

 

75%

"name": "something",

"type": "text",

 

PowerApps cuts off "thingid" and other fields like it. In Advanced Tools > Monitor, I can see a 200 code. The response has all the info, including the fields that PowerApps cuts off. If an item has the field, it appears. The other 75% of the time, the field will appear in the monitor as "No value" This is still OK, and not yet a problem. 

 

The problem is when I set this result to a variable, the field that I want is removed. It is completely gone. Not even a null.

 

Does anyone have any ideas about this? Any similar stories? Fixes?

 

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    I'm not sure if I understand your requirement.If there is any problem please let me know:

    • The data structure of the return value of this API is an object.Something like:
    {
     "name":"something",
     "thingId":"123",
     "type":"text"
     }
    
    • The return value of this API is uncertain,Sometimes the specified field "thingId" will not be returned

    Sometimes its data structure is like this

    {
     "name":"something",
     "thingId":"123",
     "type":"text"
     }
    

     Sometimes its data structure is like this

     {
     "name":"something",
     "type":"text"
     }
    
    •  You are currently using the set function to save the return value of this API to a variable.
    • When the return value of this API does not contain thingId, the thingid column in your variable will disappear.

    I assume my understanding is correct.

    Firstly,let me explain why you encountered this problem:

    The function of Set is to set the variable with the value you set, so the data structure of this variable depends on the value you set. If you only have one Set function to define this variable, then the data structure of this variable depends entirely on the data structure of the return value of your API.

    Secondly,my suggestion is to create another set() formula that will never be executed to set the data structure of this variable. for example:

    Create an invisible button

    OnSelect

    Set(thevar,{
     name:"something",
     thingId:"123",
     type:"text"
     }
    )

     Visible

    false

    The advantage of this is that even if the event will never be executed, it can guarantee that there must be three text-type fields (name\thingId\type) in the variable thevar.

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello,

     

    Thanks for the help. I would also like to submit a fix.

    After further research, I think the issue is in the response field in the Custom Connector API screen. 

    I entered my response. It was something like this:

    {

    "count": 2,
    "value": [
    {
    "name": "something",
    "thingId": "123",
    "type": "text"
    },
    {
    "name": "somethingelse",
    "type": "text"
    }
    ]
    }

     

    Notice that the items are not the same.

    The Custom Connector created a response body WITHOUT thingId.

     

    When I entered this one below, which omits the second one that is missing the thingId, the Custom Connector creates the right response body. 

     

    {

    "count": 1,
    "value": [
    {
    "name": "something",
    "thingId": "123",
    "type": "text"
    }
    ]
    }

     

    The one above gives me what I want. This is unexpected behavior for sure. 


    Thanks for your help!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard