cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kishama
Helper I
Helper I

Clear dropdown in new record

Hi Friends,

I need to clean my dropdowns when I click the new button.

1. My screen datatable

kishama_3-1654912206684.png

2. My editform when clicking the "New" button

kishama_2-1654912031342.png

Thank you very much for your help

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
kishama
Helper I
Helper I

Friends I found the easy solution:

 

AllowEmptySelection = True

 

kishama_0-1655263312250.png

 

View solution in original post

5 REPLIES 5
365-Assist
Power Participant
Power Participant

When you say clean do you mean refresh from Data source or blank options?

What is the Data source you use?

phipps0218
Super User
Super User

Drop downs will have defaults that you can set. If you are using Forms. When clicking New Button. Set the Onclick property to NewForm(FormName) and this will reset your form and all its fields.

Hello @365-Assist,

Thank you very much for answering,

I try to do is the following:
"When clicking on new, my dropdown list does not have any value selected"
1. I am using a drop down list
2. The data is loaded from the sharepoint.

What I would like to know is: can the dropdown be configured to be blank or not have a selected value?

If it is not possible, then the solution would be: Add an item to the table that is always configured by default when loading the newform?

But if I do that, I must also consider validations like:

The record can only be saved as long as it is different from the default value that I have in my dropdown list

kishama_0-1655141050460.png

thank you very much for your help

365-Assist
Power Participant
Power Participant

Yes you can add blank rows to a drop down. You first need to create a collection that:

1 - Adds a blank row to the collection then

2 - Adds the rows from the SharePoint List.

Creating the Collection will look something like this:

365Assist_0-1655164343030.png

 

Then in your DropDown just reference the collection.

 

--------------------------------------------------
Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw
Twitter: https://twitter.com/assist_365

Regards
Darren Lutchner - 365 Assist

kishama
Helper I
Helper I

Friends I found the easy solution:

 

AllowEmptySelection = True

 

kishama_0-1655263312250.png

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,151)