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

default drop down in edit form (customized form)

I've searched but can't quite find this scenario :cathappy: 

 

I have a text field which has a default value when a new item is added to sharepoint list.

 

I want to edit that field from choice in dropdown when using the edit form.    That's easy I just use the Update control  on the text box data card to  say 

 

ddStatus.Selected.Title  - works fine.     However the issue is that if someone clicks edit on the sharepoint list item but doesn't actually want to edit it, makes no changes but clicks save, the text box is updated because of the the above command and it's updated to the default item in the dropdown.  

 

So how do I make it that either the dropdown 1st choice is whatever is shown in the text box (that way if they do click save it won't update to another value)  OR It will only update if they purposefully choose a new selection from the dropdown?   I'm thinking the first way may be the easiest.  I've tried putting this againts the default value on  dd    Vcurrentstatus.text  but it just gives an error.

 

Any ideas gratefully accepted  :cathappy:

1 ACCEPTED SOLUTION

Accepted Solutions
DanishIslam
Level: Powered On

Re: default drop down in edit form (customized form)

Hi vffdd,

 

Try this approach.

 

1. Create a variable on "On Visible" property of screen.

 Set(IsChanged,false)

 

2. Set "On Change" property of dropdown to update variable's value.

UpdateContext({IsChanged: true})

 

3. Set "Text" property of datacard to below code.

If(IsChanged,ddStatus.Selected.Tile,Parent.Default)

 

Hope this helps.

View solution in original post

2 REPLIES 2
DanishIslam
Level: Powered On

Re: default drop down in edit form (customized form)

Hi vffdd,

 

Try this approach.

 

1. Create a variable on "On Visible" property of screen.

 Set(IsChanged,false)

 

2. Set "On Change" property of dropdown to update variable's value.

UpdateContext({IsChanged: true})

 

3. Set "Text" property of datacard to below code.

If(IsChanged,ddStatus.Selected.Tile,Parent.Default)

 

Hope this helps.

View solution in original post

vffdd
Level: Powered On

Re: default drop down in edit form (customized form)

worked perfectly thankyou

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,069)