Showing results for 
Search instead for 
Did you mean: 
Community Champion
Community Champion

Collection to Table?



How can I turn a Collection into a Table function? I know a Collection is already a table, but how can I dynamically create a Table function based on the contents of a Collection?



1. My Custom Connector requires Table input (thanks @Mike8!)

Table({name: "temp", units: "F"})

2. I have a gallery of potential parameters to pass to the Custom Connetor:


3. Each parameter that is checked gets added to a collection (colSelected)

         name:, units: ThisItem.units

How can I parse colSelected and add the values, in the correct format, to the Table function in the Custom Connector?

I've tried doing a lookup for each parameter, but that errors out with "Internal Server error".  I started going down the path of a Switch statement for each parameter ("name" and "units") but that doesn't seem to work either.


Any ideas?


Accepted Solutions


Can you try instead of     fields:Table({.................}) --> fields:colSelectedParameters..?
It will pass the data from the collection.

View solution in original post

Solution Sage
Solution Sage

Hello ericonline 🙂


It is not completely clear what you are trying to do but if I understood correctly and you are trying to add to a collection all the checked parameters, the formula above can help you.
It iterates on the gallery that you have checked your parameters and if the checkbox is checked (true) it adds the record in the collection.


You can also use the filter function..

If the formulas above don't help, please explain a bit more what you are trying to do and we can find a solution.

Community Champion
Community Champion

Thanks for the detailed response @Mike8.


I'm able to Collect the parameters from the Gallery, using the checkboxes without issue. The place I'm stuck is turning this Collection into the Table function that my Custom Connector requires. 

In our other thread, you helped me hardcode the Table function. I'm now trying to make it dynamic based on what is in colSelectedParameters.

Basically, how do I get from here: 


To here, dynamically:


Any thoughts on this @Mike8? I also have this issue with an API.




Can you try instead of     fields:Table({.................}) --> fields:colSelectedParameters..?
It will pass the data from the collection.

View solution in original post

Community Champion
Community Champion

Wow. That was dead simple. A Collection is a Table and can be interchanged with the Table function as long as the columns are the same. 


Awesome. I feel a bit silly that I didn't try this... But Awesome, thank you!

Yes, that's it.
Not silly at all. Finally you would have found the way. We just made it a bit sooner.

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (3,052)