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

How to prevent a drop down from reverting back to it default value when a user edits a record

Hi All

 

Please can someone assist me on this issue .I have a drop down that is connected to a  SQL datasource that can allow my users to update the records on their  own  e.g. as Admin users they  can create or delete the record (drop down information  please note this done from the app) .

My challenge is I have a default value for example in this case select my incident type .The user then goes and selects the incident type from the drop down in this example it will be accident and then saves the incident record .

When an admin user goes back to edit the same record by clicking the edit icon (ResetForm(datRPEditINJURYHead)Navigate(frmRPEdit_INJURYHead ScreenTransition None) it then shows the defaults(select injury type) on all my dropdowns not the actual incident type the user selected .How can I stop this from  happening I have also tried to change the formula on the edit icon to  EditForm(datRPEditINJURYHead);Navigate(frmRPEdit_INJURYHead,ScreenTransition.None)  but that didn't work .

I am thinking there might be a property that can prevent this from happening.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How to prevent a drop down from reverting back to it default value when a user edits a record

Hi @rmaziwis ,

Could you please share more details about the formula you typed within the Items property of the Incident type Dropdown Box?

Could you please share a bit more about the Default property of the Incident type Dropdown Box?

Further, could you please share a bit more about the data source the Edit form connects to? Which type is the 'Incident type' field?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Please take a try with the following workaround:

Set the Default property of the Incident type Dropdown box to following:

If(
   EditForm1.Mode = FormMode.New,   /* <-- EditForm1 represents the Edit form in your app */
   "select my incident type",
   ThisItem.'Incident type'
)

or

If(
   EditForm1.Mode = FormMode.New,   /* <-- EditForm1 represents the Edit form in your app */
   "select my incident type",
   Parent.Default
)

Please take a try with above solution, then check if the issue is solved.

 

If the Incident type Dropdown box is a ComboBox control, please consider set the DefaultSelectedItems property of the ComboBox to following:

If(
   EditForm1.Mode = FormMode.New,   /* <-- EditForm1 represents the Edit form in your app */
   {
      Value: "select my incident type"
   },
   {
      Value: Parent.Default             /*<-- Or type ThisIten.'Incident type' */
   }
)

 

Best regards,

Community Support Team _ Kris Dai
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

1 REPLY 1
Community Support Team
Community Support Team

Re: How to prevent a drop down from reverting back to it default value when a user edits a record

Hi @rmaziwis ,

Could you please share more details about the formula you typed within the Items property of the Incident type Dropdown Box?

Could you please share a bit more about the Default property of the Incident type Dropdown Box?

Further, could you please share a bit more about the data source the Edit form connects to? Which type is the 'Incident type' field?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Please take a try with the following workaround:

Set the Default property of the Incident type Dropdown box to following:

If(
   EditForm1.Mode = FormMode.New,   /* <-- EditForm1 represents the Edit form in your app */
   "select my incident type",
   ThisItem.'Incident type'
)

or

If(
   EditForm1.Mode = FormMode.New,   /* <-- EditForm1 represents the Edit form in your app */
   "select my incident type",
   Parent.Default
)

Please take a try with above solution, then check if the issue is solved.

 

If the Incident type Dropdown box is a ComboBox control, please consider set the DefaultSelectedItems property of the ComboBox to following:

If(
   EditForm1.Mode = FormMode.New,   /* <-- EditForm1 represents the Edit form in your app */
   {
      Value: "select my incident type"
   },
   {
      Value: Parent.Default             /*<-- Or type ThisIten.'Incident type' */
   }
)

 

Best regards,

Community Support Team _ Kris Dai
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

Helpful resources

Announcements
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.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

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 (9,952)