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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / DefaultSelectItems Com...
Power Apps
Answered

DefaultSelectItems Combox - Screen edit reset values

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Community!

 

I'm stuck on something that's initially simple:

 

What I want:

I want when a user enters to edit an existing registry that nothing changes, only the user can do it.

 

What is happening:

I have trouble keeping the value selected by the user when editing an existing register.

 

Setting:

In Advanced property items of the element ComboBox I'm using the function ShowColumn and Search to get values that are in a different data source.

 

Field A

  • The Datasource and where we save data is different from the options that appears in the combobox
  •  Function items = ShowColumns(Search(DataSourceDifferent, "", "ColumnA"), "ColumnA")
  • DefaultSelectedItems = empty

 

The behavior I get:

  • CORRECT: The behavior of the function is correct, because in the ComboBox it shows list of the column that I want to show and is saved correctly in the data source in which I want it to be saved
  • INCORRECT(What I need to resolve): when you access that saved registry the Field A is empty again [having the correct bahavior] I need this Field A to save the initial value inserted by the user. And here where DefaultSelectedItems is not getting the record. Can you help me please?

 

Extra de difficulty:

I can't use more screens

 

Thank you in advance for the help

 

 

Categories:
  • Verified answer
    BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @Anonymous ,

     

    Is it possible to try saving the selected value to a variable and use that same variable for the DefaultSelectedItems property:

     

    OnChange = UpdateContext(locSelectedItem, Self.Selected)
    DefaultSelectedItems = locSelectedItem

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks a lot! It has worked, in my case in the OnChange it has not been necessary to add The self function gave me error

     

    UPDATE:

    In the end the previous solution did not work for me, I don’t know what was the reason but for a few seconds the value remained but in the end it disappeared.

     

    In the end what I have done is use a conditional as proposed in another POST: Solved: Combo box "Selected" not really selected until a p... - Power Platform Community (microsoft.com)

     

    Update property of datacard

    If(Len(ComboBox1.Selected.DisplayName)=0,
     ThisItem.ManagerDisplayName,
     ComboBox1.Selected.DisplayName
    )  

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard