Hello,
I have a drop down on a gallery. On Change of the drop down, I have the following formula: Collect(CollectionName, ThisItem, {DropDownName: DropDownName.Selected.Value}). When I look at my collection after a change, it is showing all of the attributes associated with ThisItem on one line and then a second line shows only the drop down selected value. The ThisItem attributes are feeding in from a power bi report. In the screenshot below, the 6 should be in the blank spot above. RestockQty is the column name in my formula. I wrote it generic above to be more clear.
Any help would be greatly appreciated.
Solved! Go to Solution.
In case, you want to collect only the dropdown selections, can you update the expression to: Collect(CollectionName, {DropDownName: DropDownName.Selected.Value})
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @Mike_54
I am assuming that you have CollectionName in the Items property of the gallery. In case you want to modify the record, you need to update the expression to:
Patch(CollectionName, ThisItem, {DropDownName: DropDownName.Selected.Value})
Collect is used to only add new values and not update the existing ones.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Thank you for the reply! I do have a separate gallery with CollectionName in the item property. This gallery, however is showing the data coming in from power bi. Then, the user selects a value in the drop down and it should add a row for that item with the new drop down qty to the collection. So, the collection is blank before the user selects a drop down value. Is that more clear?
In case, you want to collect only the dropdown selections, can you update the expression to: Collect(CollectionName, {DropDownName: DropDownName.Selected.Value})
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Thank you.
Ideally, I would be able to add all the info attached to the item to a row in my collection with the selection in the drop down. If I change my formula to Collect(CollectionName,{Article: ThisItem.Article, RestockQty: DropDownName.Selected.Value}) then it will put them on the same row. I have to spell out all the columns I want, but not a big deal. The only issue now, is that I have multiple items and each has it's own drop down. However, if I select the first item and a drop down value of 1, I see it correctly on my collection. If I then select a second item's drop down and choose 2, it will add another row to my collection, but it will now show the selection of "2" on both rows. How can I get the collection to show the selected value in the specific drop down associated to each item?
Hi @Mike_54
I used the same expression that you are using and I am able to get the required results. Can you confirm if you have any other expression that might affect the behaviour?
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
You're right. There were something off on the gallery where I was showing my collection. Everything is working now. Thank you! I'll mark your answer as a solution.
User | Count |
---|---|
230 | |
102 | |
98 | |
56 | |
33 |
User | Count |
---|---|
282 | |
112 | |
109 | |
64 | |
62 |