Hi all,
I have an app that lets people quote parts for customers. I am able to successfully create, save and load quotes - but have an issue when I try to edit them.
The details of a quote are loaded into the app as collections. I have a collection called colEditBlowerDetails for when I am editing a quote. There is a ComboBox called "BlowerModel" which brings in the previously selected blower. When I try to re-save the quote, I re-collect all the data to save it again. My problem is, when I use ClearCollect the value from my combobox disappears, and nothing is added to the collection for it.
The default selected items property for the ComboBox is [First(colBlowerDetailsEdit).BlowerModel]
My clear collect function updates Blower Model with: ClearCollect(colBlowerDetailsEdit,
{'Quote #': "Test2",
BlowerModel: BlowerModel.Selected.'Product Name' ,
every other item I collect and save is done so successfully.
The combobox's items property is set to: Filter('Scope 2 Products', Text('Product Category') = "Blower")
If I manually enter a blower in the combobox, the ClearCollect function works properly. I only have this issue when trying to copy over the default selected item.
Does anyone know why I am not able to collect my combobox value, and then save it back to dataverse?
The screen before I click "Button" (has the clearcollect formula in it)
The screen right after I click "Button" (has the clearcollect formula in it)
^ Before Clear Collect ^After ClearCollect
Hello,
using ClearCollect does clear the collection items, if you want to add you should use Collect, if you want to edit you need to use Patch.
to use patch you need first to select the record you want to add wither by an ID or a unique column value ex:
Patch(LookUp(collection, ID = varID),{Column: New-Value }).
Regards.
WarrenBelz
146,631
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,991
Most Valuable Professional