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

Order Form with Multiple Items

I'm building an order form around a large pricelist. I would like to add user entered quantities and calculated fields from the gallery to a collection. 

 

When I use the simple clear collect, all the "custom" fields like Quantity, Calculated pricing, etc, are added to the collection as tables. 

 

 

Is there a simple solution? Atthached is a screenshot.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Order Form with Multiple Items

Hi @AFWright,

Could you please share more details about the ClearCollect formula within your app?

Could you please share a bit more about the "custom" fields that you mentioned?

Fuether, could you please show more details about the Items proeprty of your Gallery?

I have made a test on my side, don't have the isssue that you mentioned, please take a try with the following workaround:11.JPG

Set the Items property of the "Collection" button to following (not using ClearCollect function😞

Clear(RecordsCollection);
ForAll(
Gallery1.AllItems,
Collect(
RecordsCollection,
{
PName: ProductName,
Price: 'Store Valuation',
Area: ProductionArea,
CustomFiled1: Label3.Text
}
)
)

Note: The ProductName, 'Store Valuation' and ProductionArea are all columns in my SP list data source. The Label3 is a Label control in my Gallery, which used to act as a custom field in my Collection.

On your side, you should type following:

Clear(RecordsCollection);
ForAll(
Gallery1.AllItems,
Collect(
RecordsCollection,
{
PName: Column1,
Price: Column2,
Area: Column3,
...,
...
CustomFiled1: Label3.Text,
CustomField2: Label4.Text,
...
}
)
)

Please take a try with above solution I provided, then check if the issue is solved on your side.

More details about the ForAll function and Collect function in PowerApps, please check the following article:

ForAll function

Collect function

 

Best regards,

Kris

 

 

 

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.

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Order Form with Multiple Items

Hi @AFWright

check out Shane Young’s @Shanescows video in the video section called “Customize PowerApps form like Infopath”. I think you will see how to do what you want.

Highlighted
Community Support
Community Support

Re: Order Form with Multiple Items

Hi @AFWright,

Could you please share more details about the ClearCollect formula within your app?

Could you please share a bit more about the "custom" fields that you mentioned?

Fuether, could you please show more details about the Items proeprty of your Gallery?

I have made a test on my side, don't have the isssue that you mentioned, please take a try with the following workaround:11.JPG

Set the Items property of the "Collection" button to following (not using ClearCollect function😞

Clear(RecordsCollection);
ForAll(
Gallery1.AllItems,
Collect(
RecordsCollection,
{
PName: ProductName,
Price: 'Store Valuation',
Area: ProductionArea,
CustomFiled1: Label3.Text
}
)
)

Note: The ProductName, 'Store Valuation' and ProductionArea are all columns in my SP list data source. The Label3 is a Label control in my Gallery, which used to act as a custom field in my Collection.

On your side, you should type following:

Clear(RecordsCollection);
ForAll(
Gallery1.AllItems,
Collect(
RecordsCollection,
{
PName: Column1,
Price: Column2,
Area: Column3,
...,
...
CustomFiled1: Label3.Text,
CustomField2: Label4.Text,
...
}
)
)

Please take a try with above solution I provided, then check if the issue is solved on your side.

More details about the ForAll function and Collect function in PowerApps, please check the following article:

ForAll function

Collect function

 

Best regards,

Kris

 

 

 

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.

View solution in original post

Highlighted
Helper II
Helper II

Re: Order Form with Multiple Items

Thank you! This worked seemlessly. 

 

Now that I can collect the order, I just need to be able to add it to a spreadsheet for processing. Do you have any suggestions on the best way to take a collection and append it to a table?

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,756)