Hi,
Please note that I'm new to PowerApps as well as this community. I hope I do everything right π
I'm creating a meeting order form for ordering food and drinks. I'm connecting to a SharePoint list from Powerapps. In the SharePoint list I have several choice fields, one of them being food items that can be selected(multiple selections are allowed). For each food item selected I then want to multiply the base price(which I currently don't have anywhere in the SharePoint list) of the item with the number of people attending the meeting. The prices should then be added to create a total cost of food and drinks for the meeting.
My problem is that I have no idea how to do this. I have looked at the Datacardvalue.selected.value, but I need numbers, not the text saved in the choice.
I'm not expecting anyone to provide me a "turn-key solution" to this but if anyone can at least point me in the right direction it will be a big help π
Best regards,
Ken
I decided to redo the solution. Instead of a multiple choice field I opted to go for several checkboxes(1 per food item). It's then trivial to do calculations based on true/false of each item.
I'll mark this as solution to make it easier for other people having the same issue
Hi again,
Well, the solution works - partly π
My choice field can have multiple selections and the lookup does not support that. I only get the value of the last selected food item. I tried messing around with a filter, but either my syntax is incorrect or It's not really what I should use.
Any idea on how to solve that?
BR Ken
Thanks a lot @JK6 looks like that will work for me π
Br Ken
Hi!
Just to get you started, I created a quick example on what could be the possibility to do.
I would create a separate list,. e.g. FoodPrices
Create a connection with that in the application
Here, in FoodItems (thats the choice field that comes from the main list) I select a food item, in the Attendees I write the number of people (here for the example this is just a Number type column in SP) and then in PriceTotal it calculates the FoodPrice (from the new created list FoodPrices) * Attendees number (3 in this case).
In the PriceTotal function bar, I have this function:
LookUp(foodPrices, DataCardValue2.Selected.Value = Title).Price * DataCardValue3.Text
a LookUp funtion, that retrieves the price if the condition is met. The condition is that the selected value in the field FootItems (in this case it's "bread") is the same item in the new created list FoodPrices and then it times by attendees.
In the main list looks like this.
But this is a very quick and easy solution, not taking in account any complicated stuff you might need in the background etc.
Thank you for you quick reply @rbrooks66, but my problem is that when the the food item are chosen they have values like "Banana", "Coffee" etc. I cannot convert those to numbers.
Sorry if that was not clear in my initial post.
Use the Value(FieldName.Text) to convert a text to a number. Here's a link to the functions available in Power Apps,
https://docs.microsoft.com/en-us/power-platform/power-fx/reference/function-value
mmbr1606
41
Super User 2025 Season 1
WarrenBelz
37
Most Valuable Professional
MS.Ragavendar
32