cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lucasg123
Level: Powered On

Edit Form resets drop downs

I have two drop downs on my edit screen with item properties of Distinct('SharepointList',ColumnName) They reference lists I created to make entering new items easier for the workers. They work fine for new entries but once they try and edit an older entry and hit the edit icon on the details screen it resets those two drop downs to the first item on the list. All other entry fields don't reset. Any help to prevent those from resetting is greatly appreciated

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Edit Form resets drop downs

Hi @lucasg123,

 

Could you please share a screenshot of the dropdown you mentioned?

If the dropdown is added within a DataCard, then please change the default property of the Dropdown to 

Parent.Default

 

If doning this won't make it work, then please explain a bt for the form data source, and the relationship between the SharePoint list added in the Dropdown, so we could offer a suitable Lookup formula to find the proper value.

The logic is as below:

When form control switches to Edit Mode, we need add an If for the default property of the Dropdown.

For example:

If(Editform1.Mode=0, Lookup(), Parent.Default)

Here EditForm1.Mode has two value, 0 or 1. when value equals to 1, it is in New record mode, while 0 means the form is in Edit mode.

More details, see:

Editform and DisplayForm controls in PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Delid4ve
Level 10

Re: Edit Form resets drop downs

Are they in the datacards or or just on the form screen?

Delid4ve
Level 10

Re: Edit Form resets drop downs

If its in the datacard then do this:

 

Set the Parent default to : This Item.FieldName

Set the Dropdown default to: LookUp(TableName,ID=ThisItem.ID,FieldName)

 

If its on the screen but not in the form then do this:

 

Set the Dropdown Default to: Lookup(TableName,ID=Value(DatacardvalueNumberForTheID.Text),FieldName)

Highlighted
Community Support Team
Community Support Team

Re: Edit Form resets drop downs

Hi @lucasg123,

 

Could you please share a screenshot of the dropdown you mentioned?

If the dropdown is added within a DataCard, then please change the default property of the Dropdown to 

Parent.Default

 

If doning this won't make it work, then please explain a bt for the form data source, and the relationship between the SharePoint list added in the Dropdown, so we could offer a suitable Lookup formula to find the proper value.

The logic is as below:

When form control switches to Edit Mode, we need add an If for the default property of the Dropdown.

For example:

If(Editform1.Mode=0, Lookup(), Parent.Default)

Here EditForm1.Mode has two value, 0 or 1. when value equals to 1, it is in New record mode, while 0 means the form is in Edit mode.

More details, see:

Editform and DisplayForm controls in PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

nihalwani_raj
Level: Powered On

Re: Edit Form resets drop downs

thanks for your solution . only parent.default work perfectely. 

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,256)