SPServices and SP2013

May 5 at 10:10 AM
Hello,

I've been using SPServices for a long time on SP2010 in my company. We just started some test migrations to SP2013 but sadly not all SPServices functions work on it.

So I have a question, are there any plans to rewrite SPServices for full SP2013 support?

Arkadiusz
Coordinator
May 5 at 2:32 PM
Arkadiusz:

SPServices ought to work well with 2013. Can you be more specific about the issues you're seeing?

M.
May 5 at 3:06 PM
Edited May 5 at 3:07 PM
We are using multiple SPFilterDropdown and SPCascadeDropdowns. On IE 11 the lookup dropdowns on new item form doesn't display any element.
Code example below:
<script language="javascript" src="/Scripts/jquery.min.js" type="text/javascript"></script> 
<script language="javascript" src="/Scripts/jquery.SPServices.min.js" type="text/javascript"></script> 
<script language="javascript" type="text/javascript">

$(document).ready(function() {
    $().SPServices.SPFilterDropdown({
      relationshipList: "Sposób użytkowania nieruchomości",
      relationshipListColumn: "Title",
      columnName: "Sposób użytkowania",
      CAMLQuery: "<Eq><FieldRef Name='arch' /><Value Type='Boolean'>0</Value></Eq>",
      promptText: "Wybierz {0}...",
      completefunc: null,
      debug: true
    });
});</script>
And we got this.
https://drive.google.com/open?id=0B5DCs9yG4I13M05VZVVGOVZlTDg

But it worked well on SP2010
Coordinator
May 6 at 3:00 PM
It could be a couple of things. The translations between languages aren't perfect in the naming of the elements in the page (it appears you may be running a different language pack than English?). Also, is the column "Sposób użytkowania" required?

It would be helpful if you could paste the markup for that column here so that I can take a look.

M.
May 9 at 7:05 AM
Edited May 9 at 7:13 AM
First I would like to thanks for fast reply.

Yes we use Polish language packs, and no the column "Sposób użytkowania" isn't required.

I'm not sure what You mean by markup for that column, so I'll paste some field properties :)
Title        : Sposób użytkowania
InternalName : sposob_uzytkowania
StaticName   : sposob_uzytkowania
SchemaXml    : <Field Type="Lookup" DisplayName="Sposób użytkowania" Required="FALSE" EnforceUniqueValues="FALSE" List="{d66fa254-7027-4452-b366-a2b94f751a51}" ShowField="Title" UnlimitedLengthInDocumentLibrary="FALSE" RelationshipDeleteBehavior="None" ID="{d40819e4-356b-40ac-b74d-811165e1607a}" SourceID="{0389883b-2470-46a4-872d-fbe3f44caf35}" StaticName="sposob_uzytkowania" Name="sposob_uzytkowania" ColName="int1" RowOrdinal="0" Group="" Version="1" />
I want to mention that solution worked perfectly on SP2010, and that on our SP2010 we also use Polish language pack.

You gave me the idea about some language translation problems, so I tried to tweak some things and for that specific field I've manage to fix the problem.
I had to change the columName property to internalname of field and it started working. Now I'll try to fix SPCascadeDropdowns, so we'll see.

It seems there are some difference how SPServices works on SP2010 and SP2013 and also there is inconsistent in how we pass relationShipList and columnName to SPFilterDropdown. Nevertheless great work :)
May 9 at 7:27 AM
Edited May 9 at 7:45 AM
Sadly my joy was premature.

I managed to fix the problem with displaying the lookup, but the filter camlQuery still doesn't work. I even changed the relationShipList to some internal list name "sposob_uzytkowania_nieruchomosci".

So still fighting and looking for ideas.

I'm now sure that ColumnName must be the field displayed name "Sposób użytkowania", cause only then SPFilterDropdown hook into it and displays the prompt.

So I use trail and errors method but still not clue why the lookup field on new item form only displays SPFilterDropdown prompt and not related list elements :( I even changed the language back to English.
Coordinator
May 10 at 5:23 PM
@arkadiusz:

If you check the docs for SPFilterDropdown, you can see that columnName should be the DisplayName.

I'm a little lost about where things stand for you now. When I asked about the markup, I meant the HTML in the page for the specific columns where things aren't working.

M.