cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Dropdown is always showing BrowseGallery.Selected value

Hello there,

I have a Sharepoint List that contains a column called Title, I want the entry control of this field to be a dropdown which is populated from a collection, my problem is with the default value of the dropdown. I did the following:

1- Deleted the TextBox on the EditForm and replaced it with 'dropdown'

2- Updated the 'Default' property of the 'dropdown' to Parent.Default

3- Updated the 'Update' property of the parent DataCard to dropdown.Selected.Value

4- The Defualt value of the parent DataCard is ThisItem.Title

5- the 'Item' property of the EditForm is 'BrowseGallery.Selecte'

 

now, when I enter the EditScreen in Edit Mode it is all fine but when I enter the EditScreen in New Mode the dropdown is showing the value of the Title in the 'BrowseGallery.Selected' while it should be blank (I have a blank entry at the top of the column of the collection)

 

I am using RestForm on the OnSuccess event

I tried resting the dropdown manually using UpdateContext({ ResetVar: true }); UpdateContext({ ResetVar: false }) on the OnSuccess event of the EditForm but didn't work

 

The Only workaround that worked is using UpdateContext({ ResetVar: true }); UpdateContext({ ResetVar: false }) on the OnVisible event of the EditScreen which looks very stupid since the value of the BrowseGallery.Selected.Title appears for a second before it gets wiped

 

Any Ideas?

 

Thanks

Alaa

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper II
Helper II

Replying to myself,

One of the things I was trying is:

If(EditForm.Mode = FormMode.Edit, Parent.Default, Blank())

or even

If(EditForm.Mode = FormMode.Edit, Parent.Default, "")

but then when I put "1" it all worked fine

 

If(EditForm.Mode = FormMode.Edit, Parent.Default, "1")

View solution in original post

1 REPLY 1
Highlighted
Helper II
Helper II

Replying to myself,

One of the things I was trying is:

If(EditForm.Mode = FormMode.Edit, Parent.Default, Blank())

or even

If(EditForm.Mode = FormMode.Edit, Parent.Default, "")

but then when I put "1" it all worked fine

 

If(EditForm.Mode = FormMode.Edit, Parent.Default, "1")

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,860)