Issue with SPFilterDropdown and Internet Explorer

Nov 18, 2011 at 12:45 PM

Hello everyone.

I am having an issue with SPFilterDropdown when someone access my customized SharePoint form using Internet Explorer.  SPFilterDropdown works as expected when someone fills out the form, meaning it filters the list correctly.  The issue I am having is with the data that is written to the List once form input has been saved.

Whenever the form input has been saved, I have a workflow that runs which performs a look up on the data that was selected from the drop down menus in the form.  Since it is not required for the drop down menus to have a value, I set up the workflow check to see if the value entered for the menu is null.  The problem I am having is, if a user fills out that form using Internet Explorer, if they do not select an option from the drop down menu or if they select the (None) value, something other than null is entered into the SharePoint List, causing my workflow to fail.

I discovered that if I fill out the form using either Firefox or Chrome, everything works just fine.  Null is entered into the List and my workflows executed without fail.  I wondered why that was, so I ran a CAML query against the SharePoint List to see the raw data that was written to the list and I discovered that for each entry which was added using Internet Explorer, a value of 0;# was added while each entry that was added by Chrome or Firefox, null was added instead.

Does anyone have any idea why that might be?

Thank you for your help and for any assistance you can provide.

Coordinator
Nov 18, 2011 at 12:50 PM
Have you checked to see if the same thing happens when you don't use SPFilterDropdown?

M.
Nov 18, 2011 at 1:13 PM

Hello marc.

I hadn't considered that.  If I remove SPFilterDropdown, the behavior still occurs.  I guess it's a quirky behavior with SharePoint itself then.  Thank you for your help as I now know what to look for.

Take care and have a good day.

Nov 18, 2011 at 3:50 PM

This is just a follow up just in case someone in the future should ever run into this problem.  I've discovered that when you have a lookup drop down menu which contains more than 20 items, SharePoint 2010 will automatically change the menu from a standard drop down menu to some sort of weird drop down text box hybrid menu.  More information can be found on that by going here.  This menu will only appear if you are using Internet Explorer, not Firefox nor Chrome.

If an entry is not selected in this menu, the value 0;# will be entered into the SharePoint List rather than null.  If you have less than 20 items in your list, the old classic drop down menu will appear and if no value is entered into that menu, null will be entered into the SharePoint List.  To get around this annoyance when using workflows, you will have to check to make sure your values are not null in addition to not equaling 0;#. Of course, if you know the lookup list used by your drop down menu will never have more than 20 items in it, then feel free to only check for null.  Again, this issue only occurs in Internet Explorer as that funky non standard drop down menu only appears when IE is used and only if you are running SharePoint 2010.

Coordinator
Nov 18, 2011 at 4:04 PM

Yes, the funky "dropdowns".

http://sympmarc.com/2010/05/19/two-types-of-sharepoint-forms-dropdowns/

M.