cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

How to add a full column into collection

Hello everyone, 

 

I want to Collect data from a Gallery to Collection with something below:

 

 

Collect(Collection_Cart, {'Part No.': Label_PartNo.Text, 'Trade Price': Label_Price.Text, Quantity: Label_Quantity.Text})

 

 

In this code, [Label_PartNo] is a label in Gallery. The code above only collect first record.

 

I tried with 

 

 

Collect(Collection, Gallery.AllItems)

 

 

But it only returns a Nested Table which is not what I want.

 

Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: How to add a full column into collection

Hi @CaiChicken ,

Do you want something like

ClearCollect(
   Collection_Cart,
   AddColumns(
      Gallery.AllItems,
      "Part No.",
       Label_PartNo.Text,
       "Trade Price",
       Label_Price.Text,
       "Quantity",
       Label_Quantity.Text
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: How to add a full column into collection

Hi @CaiChicken ,

Do you want something like

ClearCollect(
   Collection_Cart,
   AddColumns(
      Gallery.AllItems,
      "Part No.",
       Label_PartNo.Text,
       "Trade Price",
       Label_Price.Text,
       "Quantity",
       Label_Quantity.Text
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

Highlighted
Helper I
Helper I

Re: How to add a full column into collection

Yes, that solved my problem

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,967)