cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AFWright
Level: Powered On

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 Team
Community Support Team

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
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 Team
Community Support Team

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

AFWright
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,963)