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 / Combo box resets when ...
Power Apps
Unanswered

Combo box resets when updating form

(0) ShareShare
ReportReport
Posted on by 94

Hi all,

 

I have created a form for maintenance checks that includes date pickers, combo boxes and text inputs. The form does NOT use a gallery, but instead finds the record to edit/view using an ID search:

R45_1-1719154451131.png

Upon submission, the form correctly goes to view mode and allows editing of the submitted fields upon selecting the edit icon. The issue I have is when I edit the form and do not reselect the item in the combo box, the form will assume and submit a blank even though there appears to be a selected item in the combo box. E.g. If only the "Pressure Building Circuit" field of a saved record is updated to "Acc" then that would be the only field saved when I view the form afterwards. The other combo boxes become blank in the data source despite being unchanged and appearing to be there when I update.

 

This issue only applies to the combo boxes and the text and date correctly shows and updates the ThisItem.FieldName. The default selected items is "Acc" when form is new but parent.default when view or edit mode. The options are taken from the Status column in a dataverse table.

 

Card update property:

DataCardValue14.Selected.'Status (cr1ec_status)'

DefaultSelectedItems property:

If(
    New,
    Filter('Check Statuses', cr1ec_status = "Acc"),
    Table({Value: ThisItem.'Pressure Building Circuit'})
)

Any help on resolving this issue would be appreciated, thanks.

Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @R45 - as you're aware, the Dataverse "Status" field is a system generated column. I would expect the below in the Update property of the DataCard:

     

    DataCardValue14.Selected.Value

     

    You on the other hand have this:

     

    DataCardValue14.Selected.'Status (cr1ec_status)'

     

    This means you have modified the Items property of that ComboBox. Why?

  • R45 Profile Picture
    94 on at

    Hi @Amik,

     

    Thanks for your response. I have since just deleted the dataverse table and input the options in the items as ["Acc,"Fail"] etc and this has worked. Update is now correctly:

    DataCardValue14.Selected.Value

    However, for a different combo box on this form I cannot do this method. This defaults to the user's display name if form is new and the ThisItem.'Serviced By' otherwise. See below:

    R45_0-1719259227678.png

    Is there a way to adjust this as with the other fields. Items cannot be manually typed here. Item property is:

    Office365Users.SearchUser({searchTerm:Self.SearchText})

    Thanks

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @R45 - sorry is this an entirely new question unrelated to your original issues with the Status field?

     

    I do not quite understand your new question, but if I had to guess, you're trying to set a ComboBox to default to the current logged in user if your EditForm control is in New Mode. Looking at your screenshots, it looks like you're using a solution applicable to SharePoint rather than Dataverse.

     

    For Dataverse, assuming the "Served By" field is a LookUp to the Users table, I would expect you have the below on the DefaultSelectedItems property:

    If(
     'Your Form'.Mode = FormMode.New,
     LookUp(
     Users,
     'Primary Email' = User().Email
     ),
     Parent.Default
    )
  • R45 Profile Picture
    94 on at

    Hi @Amik ,

     

    You are correct in assuming when new I would like the combo box to default to the current user. This combo box also allows searching of the office 365 users, not a SharePoint or dataverse table. It's the same issue but a different combo box. I need the items to be this office365users as opposed to manually entering the names which is how I fixed the previous issue. I just want to be able to edit the submitted data (to SQL). Can this be done? Thanks 

     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard