cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sanoj
Advocate I
Advocate I

Clear dropdown value / reset dropdown to default value in edit form.

Scenario : Form consists of multiple textboxes and dropdowns. Datasource is Sharepoint and the data is saved into a SharePoint list. One of the dropdown is to choose the skill level, dropdown name is "Java" with 3 skill levels - Beginner, Intermediate & Expert. The default value of the dropdown is set to blank in SharePoint list.

While creating a new item, I chose the value "Expert" for the dropdown and submitted the form.

Later I decided to clear the value in dropdown and to leave it blank.

 

Issue : In the edit form, I cleared the value in dropdown (Java) and submitted the form. The value "Expert" remains as such in SharePoint list and is not getting cleared or not resetting to the default blank value. Tried editting the form couple of times with no luck.

 

Solution : Use the "Update" property of the DataCard to clear the dropwdown or to set the default value as you wish. Screenshot below.

1. Select the datacard

1.png

2. Choose the "Update" property

2.png

3. Set the value to - If(DataCardValue29.Selected.Value = Blank(),{Value: "",
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}, DataCardValue29.Selected)

 

"DataCardValue29" is the "Java" dropdown and in the edit mode if the selected value is blank then set the blank ("") value (or you can specify your default value mentioned in the  SharePoint list). This will update the value in list.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuxima-msft
Community Support
Community Support

Hi @Sanoj ,

 

Thanks for your post and the solution.

 

Best Regards.

Yumia

View solution in original post

5 REPLIES 5
v-yuxima-msft
Community Support
Community Support

Hi @Sanoj ,

 

Thanks for your post and the solution.

 

Best Regards.

Yumia

View solution in original post

imranamikhan
Advocate I
Advocate I

Hi @Sanoj

 

Thank you very much for this. Do you know if I could apply this logic to reset/clear a text input box on SharePoint?

 

https://powerusers.microsoft.com/t5/General-Discussion/Update-Text-Input-Box-on-SharePoint-Edit-Mode...

The link to the original post for the solution doesn't work. I can't see what the solution was.

Am I missing anything?

mcaleer1
Regular Visitor

Thank you!

Jaison11
Frequent Visitor

Hello,

 

Thank you for this solution.  It works for me when I am trying to reference to see if a dropdown1 equals a value -example:  If(Dropdown1.Selected.Value = "Yes",Dropdown2.Selected,{Value: ""}). 

 

However, it does not clear Dropdown2 if Dropdown1 is blank - Example If(Dropdown1.Selected.Value = Blank(),{Value: ""}, Dropdown2.Selected). 

 

Any suggestions?  Thank you for your help!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,109)