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

Response from custom connector is fetched but collection is blank

Hello creators.

 

I am creating a power app that utilizes a custom connector to retrieve data from a Sage300 API. Where i have successfully got the Custom connector to respond with the correct JSON data, but when attempting to save the collected data in Power apps with a Collection, the collection contains all the column headers but only contains a single blank row after performing a ClearCollect.

 

Here is the details on the Custom Connector, Power apps integration, current findings and tried fixes:

 

Connector action info:

Tatheon_0-1649949510136.png

(paths and filter query are fully functional)

Tatheon_1-1649949588525.png

Tatheon_2-1649950425665.png

This Thicc boi is the response body, it appears that no headers are required.

The response body has been pasted from Postman, so all response body names in the power app response, are identical to the names found in the API response body names.

 

 

Tatheon_4-1649950587418.png

After creating a connection and filling out the relevant fields...

Tatheon_6-1649950800815.png

The API responds with the correct data.

 

Power apps

After adding the Custom connector to Power apps as a Data source, i tested the response again and tried to store the response in a collection as seen below:

Tatheon_10-1649952019596.png

 

Note: the variables strCompany, strModule and strRecource have the correct values in them.

After clicking the button and waiting for the response i notice the collection that is supposed to contain the response is empty but contains all the column headers...

Tatheon_9-1649951859864.png

 

one interesting thing is that in Monitor, you can see the Network request successfully calling the correct data, is able to "Tablify" the JSON in Monitor, but when it gets to the ClearCollect stage, it only collects one row (Blank)

Tatheon_11-1649952317184.png

Tatheon_13-1649952427702.png

(Tablify)

Tatheon_14-1649952510040.png

For some reason it appears that it loses the data between the Network request and the Function to store the data.

 

Any idea if this is a caching issue or is there something i need to do to the JSON before it is sent to Power apps.

Here is a detailed image of the response body:

Tatheon_15-1649952894850.pngTatheon_16-1649952965890.png

 

I hope to hear from whomever knows something i dont soon. And thank you for the help in advance.

 

 

 

 

 

1 REPLY 1
klaasdejong
Frequent Visitor

Hi! Are you sure your schema is correct?

 

I just had the issue that the response was good, it just collected an empty row into a gallery. I then noticed that my schema (response in Custom Connector editor) was somehow changed. I messed around with the Swagger so maybe I just messed it up myself.

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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Kudoed Authors
Users online (2,991)