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

Powerapps on Custom API .NET

Hi folks!

 

I'm currently developing a custom API (RESTful .NET) that is working on powerapps.

I've no problem with the GETs or simple parameters like string or integer, but when I'm working on the POST I need to work with an entire collection, and I can't find the right type of variable to work with.

 

How can I represent a collection? A buffer?

 

Thank you,

 

3 REPLIES 3
Highlighted
Community Support
Community Support

HI @ToniSans ,

Could you please share a bit more about your scenario?

Do you want to send a POST request to your custom REST API along with a whole collection?

Further, which schema do you specified within the request body of the POST action in your custom conector?

 

Based on the needs that you mentioned, I assume that you specified a Object JSON Schema as the Request Body of the POST action in your custom connector, is it true?

 

If you want to send a POST request to your custom REST API along with a whole collection once time, I afraid that there is no way to achieve your needs in PowerApps currently. As an alternative solution, I think the ForAll function could achieve your needs.

 

On your side, please consider take a try with the following formula:

 

// Send POST requests based on the amount of WholeCollection records
ForAll(
       WholeCollection,
       'CustomConnector'.PostActionName({
                                          argument1: WholeCollection[@Column1],
                                          argument2: WholeCollection[@Column2],
                                          argument3: WholeCollection[@Column3],
                                          ...
                                        })
)

 

Note: The Column1, Column2, Column3, ... represents the columns from your WholeCollection.

 

More details about the ForAll function, please check the following article:

ForAll function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

Thanks for your answer Kris.

 

Unfortunately when I use a ForAll I make multiple request and I need it all at once.

 

Kind regards,

Highlighted

Hi @ToniSans ,

If the Request Body part you specified within the POST action in your custom connector is a Object, I afraid that there is no way to achieve your needs in PowerApps currently.

 

Currently, within PowerApps, the Request Body of the POST action in a custom connector could only allowed to provide a JSON Object value rather than a Table value.

So if you want to send a POST Request to your REST API along with a whole collection (Table value), I afraid that there is no way to achieve your needs.

 

If you would like this feature to be added in PowerApps, please consider submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,103)