I am trying to create an app that allows our staff to order stationery. The app is connected to a sharepoint list. Just now the user can complete an order form for 1 item then submit, but there are likely to be times when they want to order more than one item at a time.
Is there a way that this can be done? I was thinking they press a button to add a new line but i really have no idea what i'm doing and any advice would be great?
Solved! Go to Solution.
Hi @neill_long,
Do you want to add multiple orders within your app at the same time?
I agree with @Drrickryp's thought almost, I think the following video would help in your scenario:
https://www.youtube.com/watch?v=xgznk4XlPCo
You could consider take a try to create a Label control or TextInput control (or other controls) for each column in your SP list within a Gallery control (instead of using Edit form control).
I have created a SP list on my side, the data structure as below:
I have made a test on my side, please take a try with the following workaround:
Set the OnVisible property of the first screen of my app to following formula:
ClearCollect(OrderCount,1)
Set the Items property of the Gallery control (Gallery1) to following:
OrderCount
Set the OnSelect property of the "New Order" button to following formula:
Collect(OrderCount,CountRows(OrderCount)+1)
Set the OnSelect property of the "Upload" button to following formula:
ForAll(
Gallery1.AllItems,
Patch(
'20180918_case9',
Defaults('20180918_case9'),
{
Title:"PowerApps Test",
Product_x0020_Name:TextInput1.Text,
Price:Value(TextInput2.Text),
Executor:TextInput3.Text
}
)
)
Note: The '20180918_case9' represents the SP list data source within my app.
On your side, you should type the following formula:
ForAll(
Gallery1.AllItems,
Patch(
'YourSPList',
Defaults('YourSPList'),
{
Title:"PowerApps Test",
Column1:TextInput1.Text,
Column2:TextInput2.Text,
Column3:TextInput3.Text,
...
}
)
)
The GIF screenshot as below:
More details about Patch function in PowerApps, please check the following article:
Best regards,
Kris
Hi @neill_long,
It sounds like you would like something like repeating tables in your gallery. This is a feature that was popular in Infopath forms. Shane Young has a great video explaining how to do this. Please check out https://www.youtube.com/watch?v=xgznk4XlPCo. There are some other ways to do this using Forms but I think Shane's approach is the best.
Hi @neill_long,
Do you want to add multiple orders within your app at the same time?
I agree with @Drrickryp's thought almost, I think the following video would help in your scenario:
https://www.youtube.com/watch?v=xgznk4XlPCo
You could consider take a try to create a Label control or TextInput control (or other controls) for each column in your SP list within a Gallery control (instead of using Edit form control).
I have created a SP list on my side, the data structure as below:
I have made a test on my side, please take a try with the following workaround:
Set the OnVisible property of the first screen of my app to following formula:
ClearCollect(OrderCount,1)
Set the Items property of the Gallery control (Gallery1) to following:
OrderCount
Set the OnSelect property of the "New Order" button to following formula:
Collect(OrderCount,CountRows(OrderCount)+1)
Set the OnSelect property of the "Upload" button to following formula:
ForAll(
Gallery1.AllItems,
Patch(
'20180918_case9',
Defaults('20180918_case9'),
{
Title:"PowerApps Test",
Product_x0020_Name:TextInput1.Text,
Price:Value(TextInput2.Text),
Executor:TextInput3.Text
}
)
)
Note: The '20180918_case9' represents the SP list data source within my app.
On your side, you should type the following formula:
ForAll(
Gallery1.AllItems,
Patch(
'YourSPList',
Defaults('YourSPList'),
{
Title:"PowerApps Test",
Column1:TextInput1.Text,
Column2:TextInput2.Text,
Column3:TextInput3.Text,
...
}
)
)
The GIF screenshot as below:
More details about Patch function in PowerApps, please check the following article:
Best regards,
Kris
Hi
I've had a go at the steps you outlined @v-xida-msft and i am half way there.
I am having difficulty with the Upload side of things. I have amneded the details of the patch function to this:
ForAll(
Gallery2.AllItems,
Patch(
'Testing',
Defaults('Testing'),
{
Title:"PowerApps Test",
Date_x0020_of_x0020_Request: DatePicker1.SelectedDate,
StaffName: Dropdown2.Selected.Value,
Quantity: Value(TextInput7.Text),
Item: Dropdown1.Selected.Value,
...
}
)
)
The SP list is called Testing.
I have changed the fields from textinput, one is a datepicker, two fields are dropdowns which get their items from the datasource 'Testing'. Not sure if this makes any difference. Do the fields have to be TextInput?
Here is a screenshot of the SP List:
Any advice on where i may have gone wrong would be appreciated.
thanks
Alistair
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
209 | |
47 | |
43 | |
41 | |
36 |
User | Count |
---|---|
290 | |
84 | |
81 | |
79 | |
77 |