I'm currently using excel as a data source. To create my collection I used an add to cart button with the OnSelect formula:
Collect(WCDCOrder, ThisItem); Navigate('WCDC Shopping Cart'); ScreenTransition.Cover
The issue I'm having is I have a drop down option for user's to select the quantity of the item needed. How can I get this column added to the collection?
*In the screenshot I'm using a gallery and my excel file as the data source. The one thing not included in the excel file is the drop down menu which I want to add to the collection.
Solved! Go to Solution.
I tested this new code and it will work. Make sure to replace the reference to the gallery and dropdown with your own control names.
Collect(WCDCOrder, AddColumns(Table(ThisItem), "Quantity", Gallery1.Selected.Dropdown1.Selected.Value))
The advantage is you can store the quantity in a new column alongside the original record values like this...
Field1 | Field2 | Field3 | Field4 | Field5 | Quantity |
some_value | some_value | some_value | some_value | some_value | 2 |
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Something like this
Collect(WCDCOrder, {Item:ThisItem, QTY:QTYControl.Selected.Value})
Using ADDCOLUMNS and a reference to the dropdown control should do the trick quite nicely.
Collect(WCDCOrder, AddColumn(ThisItem, "Quantity", Dropdown1.Selected.Value));
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Yah, this is the much tidier option
@TheRobRush This one worked to get the quantity in the collection but everything else from the gallery was left off. Also it didn't transfer the data to the shopping cart gallery.
@eka24 The dropdown is included in the gallery but it's not being included in the ThisItem/Collection.
I tested this new code and it will work. Make sure to replace the reference to the gallery and dropdown with your own control names.
Collect(WCDCOrder, AddColumns(Table(ThisItem), "Quantity", Gallery1.Selected.Dropdown1.Selected.Value))
The advantage is you can store the quantity in a new column alongside the original record values like this...
Field1 | Field2 | Field3 | Field4 | Field5 | Quantity |
some_value | some_value | some_value | some_value | some_value | 2 |
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
User | Count |
---|---|
198 | |
122 | |
85 | |
50 | |
42 |
User | Count |
---|---|
284 | |
159 | |
134 | |
73 | |
72 |