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 / Can't get edit form to...
Power Apps
Suggested Answer

Can't get edit form to submit dependent combo box selections

(0) ShareShare
ReportReport
Posted on by 831 Moderator
I have an edit form that populated when a record is selected from the gallery. This record's data is written to a global variable which is then used as the Item for the form. In this form I have a handful of dependent combo boxes. These were recently updated so that the combo boxes would be set to blank if the parent combo box was changed. Here is the code I am using.
 
For the parent combo box I used something like this in the OnChange property:
 
UpdateContext({varResetCampaignSource: false});
UpdateContext({varResetCampaignSource: true});
 
Then for the child's Reset property I would use:
 
varResetCampaignSource
 
For the child's DefaultSelectedItems property I am using:
 
{
 Value:
 If(
 varResetCampaignSource,
 Blank(),
 Parent.Default
 )
}
The resetting of the child combo box works great when the parent is changed but when I go to submit the update to the form the child fields go back to being blank and nothing is written to the database. How do I fix this?
Categories:
I have the same question (0)
  • futr_vision Profile Picture
    831 Moderator on at
    Update. It looks like I am getting the records o submit but when I load up the record the child combo boxes are blank. Looks like there is something going on with the varResetCampaignSource being set to true that might be blanking out the child combo boxes on gallery item selection? Not sure exactly what it is. I tried setting the OnSelect of the gallery items and setting that to varResetCampaignSource to false but as soon as I choose another item it gets set back to true.
  • Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 on at
    Hey, it has probably something to do with you if Statement. 

    As soon as something gets changed your combobox will be blank. 

    What is the default of the Parent combobox. Could we somehow take this as the if statement. 

  • futr_vision Profile Picture
    831 Moderator on at
    The Default for the parent combo boxes is nothing. The DefaultSelectedItems for the parent, in this case, is 
    {dk_campaigntypename: Parent.Default}
     
  • Suggested answer
    Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 on at
    We could start by stopping the If statement to be triggered over and over for every change  so use this only; 
    UpdateContext({varResetCampaignSource: true});
    In the Submit button you could set it back like this: 
    SubmitForm(Form1);
    UpdateContext({varResetCampaignSource: false});
    ResetForm(Form1);
     
     
     
  • futr_vision Profile Picture
    831 Moderator on at
    I can see how that will work but doesn't this break the functionality of resetting the combo boxes? It would work the first time, but it wouldn't work on a second change correct?
  • Suggested answer
    Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 on at
    Yes exactly but would you need to change the dropbox over and over before submitting the form? 
     
    If that's the case I would rethink the way you build your app. Maybe there would be a better way to get it done. 
  • futr_vision Profile Picture
    831 Moderator on at
    I ca see this happening as users get used to the app. I would hope the changes would only happen once. Ultimately, the app should stand up to any scenario I believe.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard