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
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,912)