Running SPServices in SharePoint 2013?

May 20, 2013 at 6:42 PM
Edited May 20, 2013 at 6:43 PM
Can anyone confirm that SPServices runs 100% on SharePoint 2013?

I did do a search and from the results it seems that it does work, but I just wanted to double check to be sure. So far I tried creating a simple cascade dropdown demo but I could not get it to work. I am not a SharePoint expert by any means so I might be missing something.
Coordinator
May 20, 2013 at 7:10 PM
dennison:

The majority of SPservices works fine in 2013, though I haven't tested everything. SPCascadeDropdowns ought to work fine.

M.
May 20, 2013 at 7:32 PM
Thanks Marc for the quick response, appreciate it!
May 20, 2013 at 8:26 PM
Edited May 20, 2013 at 8:38 PM
Okay, I have been tinkering with this for the past 4 hours, so either I'm too tired or this is just beyond me.

I can confirm that jQuery and SPServices is working fine by following http://sympmarc.com/2011/07/08/adding-jqueryspservices-to-a-sharepoint-page-step-one-always/. I have a suspicion that there is something wrong with Web Services, since I can do non-web service queries like SPServices.Version; with no problem, but things like SPServices.SPGetCurrentUser do not work.

I have setup a Regions list containing Country and Title fields. I can confirm those are the static names.

On my form I have two fields Country and Region. Both are set to type "Choice". I can confirm that these are the display names.

Code snippet:
<!-- Reference jQuery on the Google CDN -->
<script type="text/javascript" src="/js/jquery-1.9.0.js"></script>
<!-- Reference SPServices on cdnjs (Cloudflare) -->
<script type="text/javascript" src="/js/jquery.SPServices-2013.01.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $().SPServices.SPCascadeDropdowns({
            relationshipList: "Regions",
            relationshipListParentColumn: "Country",
            relationshipListChildColumn: "Title",
            parentColumn: "Country",
            childColumn: "Region",
            debug: true
        });
    });
</script>
Screenshots:

Main list:
Image

Lookup list:
Image
Coordinator
May 20, 2013 at 8:44 PM
Country and Region can't be choice columns; they must be lookups into the relationshipLists.

M.
May 20, 2013 at 8:59 PM
sympmarc wrote:
Country and Region can't be choice columns; they must be lookups into the relationshipLists.

M.
Ahh there we go. Wow, it really works. Amazing :) Kudos!
Coordinator
May 20, 2013 at 9:04 PM
The difference between magic and science is small. ;+)

M.
May 21, 2013 at 2:19 PM
Amen brother. Though most of the times I wish science problems can be solved by simply uttering "abracadabra"