I’m very new, I am building a simple app for a class project that tracks sodium intake. I have a database with a dropdown to select different meals. The dropdown then goes to another page to show the sodium content, but I also want to take the clicked on meal (and sodium value) and give the option to “add to daily value” to add up multiple meals in order to compare to daily required values. I can’t figure out how to do the part with building the daily meals. Every time I link a text or chart to the current food, it wont save, just changes every time with each new selection. Sorry ahead of time because I’m new. Thank you.
Hi @BelloiseKO,
Welcome to the community! ![]()
From what I can understand it’s, select a meal from the dropdown > shows it’s details with the sodium value > upon clicking an adding button in the detail screen, the sodium value should be add up into the previous added value and show the sum at last (different value per user), or show the selected meals with their respective sodium values and also show the sum of those items sodium values? Did I understood this correctly and also what have you built so far?
Let me know!
Thank you and have a great day!
Hello. Everything is correct. it is the second goal you listed for the last page. To show selected meals with respective sodium values and show their sum of sodium. I have the dropdown functional. When a meal is selected, the data is displayed on the details screen, where I have a button that links to the last page where I want the accumulating data chart.
Hi @BelloiseKO,
Thanks for the information!
It would be the similar setup that you would use for ordering/cart system which those meals with the sodium values becomes the order items. You need a separate collection to hold the multiple meals which then the same collection can be used to create the chart. So when clicking the adding button, you create a record for the logged in user with the meal and sodium value, and same thing for each new meal. Then you can show the records in that collection and also sum the sodium values. Also since it’s a daily process, you can store the current date in the collection to filter out so yesterday meal adding’s doesn’t show up today. Check this similar ordering setup. : Create a Robust, Flexible Shopping Cart System
If you’re still unable to solve it, let me know and I’ll share a quick video recording for this exact description.
Thank you and have a great day!
Thank you! That video was exactly what I needed. Unfortunately, it won’t let me use the feature because my records exceed the limit under my free membership. This being a class project, I do not want to invest in the app, but am intrigued by the website, its resources, and you guys. Dilon, thank you for taking the time to help. That video explains exactly how to set up what I wanted. Thank you, Have a Great Day!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.