cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Manipulate Table

Hey

me again I have a question about how I can add a collection to a table.

or how I can adjust a table

 for example a table with the main items product and brand

it contains 2 items how can I add a 3rd item to it.

 

Kind regards Ruben De Windt

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous 

You should write it like this instead.  Your method makes 4 separate calls to the datasource API.  Mine only makes 1 call.  This means performance will be best using my way. 

 

Patch( beamer; Defaults( beamer ); {'product ': product_beamer; 'nmbs code': nmbscode_beamer; merk:merk_beamer; groote: groote_beamer})

 

Please mark as solution 😁 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
eka24
Super User
Super User

You can use a collection and AddColumns:

ClearCollect(MYCollectionName,
AddColumns(YourExistingTable,"NewColumn","DataInNewColumn"))

You can then use the MYCollectionName as a new table for your DataTable or Gallery
mdevaney
Super User
Super User

@Anonymous 

I made a free app that has 50+ examples of how to manipulate tables.  There is a visual and code for each technique.

 

Check it out here:

https://powerusers.microsoft.com/t5/Community-App-Samples/Collections-Cookbook-50-Visual-Examples-amp-Code/td-p/437594

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Anonymous
Not applicable

found it 😄

 

i did it like this:

Patch( beamer; Defaults( beamer ); {'product ': product_beamer}; {'nmbs code': nmbscode_beamer}; {merk:merk_beamer}; {groote: groote_beamer})

 

tnx anyway 🙂

 

@Anonymous 

You should write it like this instead.  Your method makes 4 separate calls to the datasource API.  Mine only makes 1 call.  This means performance will be best using my way. 

 

Patch( beamer; Defaults( beamer ); {'product ': product_beamer; 'nmbs code': nmbscode_beamer; merk:merk_beamer; groote: groote_beamer})

 

Please mark as solution 😁 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

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!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,480)