web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Combobox selected item...
Power Apps
Unanswered

Combobox selected item resets value when I use ClearCollect

(0) ShareShare
ReportReport
Posted on by 364

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 before I click "Button" (has the clearcollect formula in it)The screen right after 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

 

Categories:
I have the same question (0)
  • AmeerJab Profile Picture
    370 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard