Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Updating a record doesn't keep values for combo boxes that don't use .Value for the Update. Why?

(0) ShareShare
ReportReport
Posted on by 825 Super User 2025 Season 1

I have screen that contains a gallery and form. When you select a gallery item the form populates with the data. This same form can be put into Edit mode with a button. Here is my problem. I can click edit and see all the values in the form but when I click Update, which submits the form, any combo box that has its Update property in this format, ComboBoxName.Selected.ColumnName, get written to the record as empty. Any combo box that has its Update property in this format, ComboBoxName.Selected.Value, gits written as expected. Why is that and how do I fix this?

Categories:
  • futr_vision Profile Picture
    825 Super User 2025 Season 1 on at
    Re: Updating a record doesn't keep values for combo boxes that don't use .Value for the Update. Why?

    I ended up removing all the Distincts and basically went through all of the combo boxes one-by-one. Looks like i got them all working as expected although I introduced a new bug but that is for another post.

  • Verified answer
    Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Updating a record doesn't keep values for combo boxes that don't use .Value for the Update. Why?

    @futr_vision - 

     

    Regarding the ComboBox with this in the Items property:

     

    Distinct(Filter(Tactics, StartsWith('Tactic Name', Self.SearchText)), 'Tactic Name')

     

    The Distinct function will return a single column Table named "Value". In the Update property of your DataCard, I assume you have:

     

    'Your ComboBox Control'.Selected.Value

     

    On the DefaultSelectedItems property of that ComboBox, you will need:

     

    {Value: Parent.Default}

     

    Regarding the ComboBoxes with these in the Items property:

     

    Sort('Campaign Types','Campaign Type Name', SortOrder.Ascending)

     

     

    Sort(Filter('Campaign Sources', 'Campaign Type Name' = CB_CampaignTypeReview.Selected.'Campaign Type Name'),'Campaign Source Name',SortOrder.Ascending)

     

    In the Update property, I assume you have:

     

    'Your ComboBox Control'.Selected.'Your Column'

     

    In the DefaultSelectedItems property for both ComboBoxes, you will need:

     

    LookUp(
     'Campaign Types',
     'Your Column' = Parent.Default
    )

     

    Explanation:

     

    Your ComboBoxes which do not use the Distinct function in the Items property return a Table of records, and it is important that the Items property of your ComboBox control and the DefaultSelectedItems property share the same table schema.

     

    Typically, we create a Single Line Text Column in SharePoint, and then insert that Single Line Text Column into an EditForm control. We then remove the Text Input control, and replace it with a different control (in your scenario, a Combo Box control). We also set the Update property to point at the selected value from that Combo Box.

     

    However, if we add the following into the DefaultSelectedItems property, we could see the following error:

     

    Amik_0-1718639329594.jpeg

     

    The ComboBox is expecting a Table. As a workaround, we can force a Value into the DefaultSelectedItems property using:

     

    {Value: Parent.Default}

     

    However, this approach does not work with DataverseAs you have noticed, if you add a Label control and reference the ComboBox , even though a value is “displayed”, the Text will still return blank. This is will because we are supposed to pass a record into the control because that is what the ComboBox control expects.

     

    To supply a record into the ComboBox, we can force the correct record into the ComboBox using the Lookup function.

  • futr_vision Profile Picture
    825 Super User 2025 Season 1 on at
    Re: Updating a record doesn't keep values for combo boxes that don't use .Value for the Update. Why?

    @Akshansh-Sharma @Amik @v-jefferni 

     

    Thanks to all three of you for your responses. Let me see if I can answer your questions.

     

    • These are Dataverse tables I am dealing with
    • All of the combo boxes write to columns in the tables that are 'Single Line of Text' as the data type and 'Text' as the format
    • If I change the selection in the combo boxes then the data source is update otherwise the existing value is overwritten with blank even though the combo box shows a value.
    • Examples of the Items property for the combo boxes that have issues

     

    Distinct(Filter(Tactics, StartsWith('Tactic Name', Self.SearchText)), 'Tactic Name')
    
    Sort('Campaign Types','Campaign Type Name', SortOrder.Ascending)
    
    Sort(Filter('Campaign Sources', 'Campaign Type Name' = CB_CampaignTypeReview.Selected.'Campaign Type Name'),'Campaign Source Name',SortOrder.Ascending)​

     

    •  For the DefaultedSelectedItems for one of the combo boxes I am currently using this:

     

    {dk_tactic: Parent.Default}​

     

    • For the form itself, I've tried both Gallery.Selected and a global vairable as the Item property
  • v-jefferni Profile Picture
    on at
    Re: Updating a record doesn't keep values for combo boxes that don't use .Value for the Update. Why?

    Hi @futr_vision ,

     

    I assume you are using SharePoint lists as data sources of these Combo boxes. In the form, Combo boxes that don't work I think they are in LookUp columns, and you have changed the Items property to another list instead of the initial Choices function. That's why you are using ComboBoxName.Selected.ColumnName in Update properties. 

     

    If this is the case, please follow below steps:

    1. in DefaultSelectedItems of those Combo boxes, the formulas will be like:

    LookUp(FormulaInItemsPropertyOfThisComboBox, ColumnName.Value = ThisItem.ColumnName.Value)

    2. in Update property of the Data card:

    LookUp(Choices(SPlist.LookUpColumnName), Value = ComboBox.Selected.ColumnName)

     

    Best regards,

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Updating a record doesn't keep values for combo boxes that don't use .Value for the Update. Why?

    @futr_vision - I suspect I know the cause but I do need you to clarify:

     

    1. Your data source (SharePoint, Dataverse, SQL etc)
    2. When you submit the Form, is your actual data source updated with those ComboBox selections?
    3. Using just one of your ComboBoxes as an example, what is the data type for the field that ComboBox is updating? (Single Line Text, Single-Select Choice etc)
    4. What do you have in the Item property of that ComboBox
    5. What do you have in the DefaultSelectedItems property of that ComboBox
  • Akshansh-Sharma Profile Picture
    281 Super User 2025 Season 1 on at
    Re: Updating a record doesn't keep values for combo boxes that don't use .Value for the Update. Why?

    Hi @futr_vision 

     

    I agree what @Amik said it is probably related to what are your columns data type in your sharepoint list for those 4 combo boxes where you are facing this issue to elaborate on this

    1. If the column data type is Single Line of Text, then this code of yours will work ComboBoxName.Selected.ColumnName (because it satisfies the backend data type of your column i.e. Text)  on your update property 
    2. If column data type if choice then this code of yours will work ComboBoxName.Selected.Value (because it satisfies backend data type of record for your column)

    so first let us know what data types you are using for those 4 columns then we will be able to debug what code is not working for what reason

     

    -------------------------------------------------------------------------------------------------------------------------

    Please click Accept as solution if my post helped you solve your issue. If the content was useful in other ways, please consider giving it Thumbs Up 😉

    LinkedIn- https://www.linkedin.com/in/akshansharma/

  • futr_vision Profile Picture
    825 Super User 2025 Season 1 on at
    Re: Updating a record doesn't keep values for combo boxes that don't use .Value for the Update. Why?

    @Amik I've also tried setting the Item property of the form to a global variable and setting the global variable on the selection of a record from the gallery. Just can't seem to get those combo boxes populated.

  • futr_vision Profile Picture
    825 Super User 2025 Season 1 on at
    Re: Updating a record doesn't keep values for combo boxes that don't use .Value for the Update. Why?

    @Amik I'm not sure I understand your clarification but let me try and reword with more detail.

     

    1. On my screen I have a gallery and a form.
      1. Form is View mode and populated when a gallery item/record is selected
    2. I have an Edit button which switches the form to Edit mode
      1. All of the values appear are still present in the form.
      2. An Update button appears in Disabled mode but flips to Edit mode if the form is Unsaved
    3. If I make a change on the form and click Update the form is submitted however if a combo box's Update property is in the format ComboBoxName.Selected.ColumnName it does not update UNLESS that combo box was one of the fields that was changed.
    4. I've added text boxes to the screen to track the 4 combo boxes I am having issues with. While selecting the gallery item shows the correct data in the form those text fields are blank. 

     

    NOTE: One thing I am also noticing is that when I put the form into Edit mode with the Edit button the Update button is already active. That shouldn't be the case. Only when a change is made should it be active.

     

    Hope this helps some. It seems like there is some issue with the form that is not registering the actual values as values but it is displaying them.

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Updating a record doesn't keep values for combo boxes that don't use .Value for the Update. Why?

    @futr_vision - to clarify, the fields in your list are correctly updated with the Combo Box selections when the SubmitForm operation is executed, but the selections made from those Combo Boxes are not preserved?

     

    If yes, the reason would depend on the data types for those fields (Single Line Text, Single-Select Choice etc) and what you have in the DefaultSelectedItem property of those Combo Boxes.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard