SPServices.SPFilterDropdown Not Working With a Certain List

Nov 16, 2015 at 9:43 PM
Greetings,

Until recently, SPFilterDropdown was working perfectly within my EditForm, using a CAML query to a list called "Projects". The filter has now seemingly stopped working for no reason.

I noticed that even with debug: true, no debug output is displayed, even if I intentionally mistype the column names.

If I change relationshipList to anything other than Projects, the debug output appears again and the function appears to execute properly.

I have tried putting this function in an edit form on another list, using Projects as the relationshipList. Again, it fails silently.

It appears that something about the Projects list is preventing the function from running, even to show the debug output.

Please help!

SP 2010
SPServices-2014.02
Jquery-1.11.3
Coordinator
Nov 17, 2015 at 1:46 PM
Edited Nov 17, 2015 at 2:04 PM
Well, something must have changed. Did you apply any updates? Did you change any settings on either of the lists?

Take a look in the console in the developer tools and see if there are any errors. Debug mode doesn't always catch everything.

M.
Nov 18, 2015 at 12:55 PM
Marc,

Thanks for your response.

I found the solution yesterday- it was the column name being changed to "[Column Name] Required Field", as described in your Office365 update post. Since the filter was working previously, I guess either the sysadmins updated SharePoint or the field was changed to required.

I tried this fix once but applied it to the column in the relationship list, not the column in the edit form (which ultimately resolved the issue).

At the end of your article, you mentioned that you were including a fix in a new version of SPServices, but I upgraded to the latest version and still had this problem.

The weirdness about the debug popup not appearing when the Projects list was used as the relationshipList is still not clear to me. I wasn't successful in finding the answer to that using the debugger.

Thank you and regards,

Josh
Coordinator
Nov 18, 2015 at 3:26 PM
Josh:

2014.02 ought to handle the " Required Field" thing for you. I've had several sporadic reports of it as an issue, but haven't been able to track down what causes it in some circumstances.

Can you tell me anything about the column? Can you paste in the markup for the column in the page? It ought to look something like the chunk of HTML below.

The reason debug doesn't show you anything is that the dropdown is just not found in the page, I think, though that ought to pop up a message.

Thanks,
M.
<select name="ctl00$m$g_d10479d7_6965_4da0_b162_510bbbc58a7f$ctl00$ctl05$ctl02$ctl00$ctl00$ctl04$ctl00$Lookup" id="ctl00_m_g_d10479d7_6965_4da0_b162_510bbbc58a7f_ctl00_ctl05_ctl02_ctl00_ctl00_ctl04_ctl00_Lookup" title="State Required Field">
                    <option value="1">Alabama</option>
                    <option value="2">Arkansas</option>
                    <option value="3">California</option>
                    <option value="4">Colorado</option>
                    <option value="5">Delaware</option>
                    <option value="6">Hawaii</option>
                    <option value="7">Illinois</option>
                    <option value="8">Indiana</option>
                    <option value="9">Kentucky</option>
                    <option value="25">Kentucky</option>
                    <option value="10">Maine</option>
                    <option value="26">Maine</option>
                    <option value="11">Maryland</option>
                    <option value="27">Maryland</option>
                    <option value="12">Massachusetts</option>
                    <option value="28">Massachusetts</option>
                    <option value="13">Nebraska</option>
                    <option value="29">Nebraska</option>
                    <option value="14">New Hampshire</option>
                    <option value="30">New Hampshire</option>
                    <option value="15">New Jersey</option>
                    <option value="31">New Jersey</option>
                    <option value="16">North Dakota</option>
                    <option value="32">North Dakota</option>
                    <option value="17">Ohio</option>
                    <option value="33">Ohio</option>
                    <option value="18">Oregon</option>
                    <option value="34">Oregon</option>
                    <option value="19">Rhode Island</option>
                    <option value="35">Rhode Island</option>
                    <option value="20">South Dakota</option>
                    <option value="36">South Dakota</option>
                    <option value="21">Tennessee</option>
                    <option value="37">Tennessee</option>
                    <option value="22">Vermont</option>
                    <option value="38">Vermont</option>
                    <option value="23">Virginia</option>
                    <option value="39">Virginia</option>
                    <option value="24">Washington</option>
                    <option value="40">Washington</option>

                </select>