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

6 REPLIES 6
v-yuxima-msft
Community Support
Community Support

Hi @Sanoj ,

 

Thanks for your post and the solution.

 

Best Regards.

Yumia

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!

KEarley
Advocate III
Advocate III

This isn't helpful.  The solution is not present when I click the green bar to see the solution.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,960)