-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjquery.SPServices-0.4.8ALPHA8.js
2002 lines (1840 loc) · 85.4 KB
/
jquery.SPServices-0.4.8ALPHA8.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* SPServices - Work with SharePoint's Web Services using jQuery
* Version 0.4.8
* @requires jQuery v1.3.2
*
* Copyright (c) 2009 Sympraxis Consulting LLC
* Examples and docs at:
* http://spservices.codeplex.com
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*/
/**
* @description Work with SharePoint's Web Services using jQuery
* @type jQuery
* @name SPServices
* @category Plugins/SPServices
* @author Sympraxis Consulting LLC/[email protected]
*/
(function($) {
// Global constants
var alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
// Global variables
var thisSite = "";
// Arrays to store Web Service / operation associations
var WS = new Array();
WS["Alerts"] = "Alerts";
WS["Authentication"] = "Authentication";
WS["Copy"] = "Copy";
WS["Forms"] = "Forms";
WS["Lists"] = "Lists";
WS["Meetings"] = "Meetings";
WS["Permissions"] = "Permissions";
WS["PublishedLinksService"] = "PublishedLinksService";
WS["Search"] = "Search";
WS["usergroup"] = "usergroup";
WS["UserProfileService"] = "UserProfileService";
WS["Views"] = "Views";
WS["Versions"] = "Versions";
WS["WebPartPages"] = "WebPartPages";
WS["Webs"] = "Webs";
WS["Workflow"] = "Workflow";
var WSops = new Array();
WSops["GetAlerts"] = WS["Alerts"];
WSops["DeleteAlerts"] = WS["Alerts"];
WSops["Mode"] = WS["Authentication"];
WSops["Login"] = WS["Authentication"];
WSops["CopyIntoItemsLocal"] = WS["Copy"];
WSops["GetForm"] = WS["Forms"];
WSops["GetFormCollection"] = WS["Forms"];
WSops["AddList"] = WS["Lists"];
WSops["CheckInFile"] = WS["Lists"];
WSops["CheckOutFile"] = WS["Lists"];
WSops["DeleteList"] = WS["Lists"];
WSops["GetAttachmentCollection"] = WS["Lists"];
WSops["GetList"] = WS["Lists"];
WSops["GetListAndView"] = WS["Lists"];
WSops["GetListCollection"] = WS["Lists"];
WSops["GetListContentType"] = WS["Lists"];
WSops["GetListContentTypes"] = WS["Lists"];
WSops["GetListItems"] = WS["Lists"];
WSops["UpdateList"] = WS["Lists"];
WSops["UpdateListItems"] = WS["Lists"];
WSops["AddMeeting"] = WS["Meetings"];
WSops["CreateWorkspace"] = WS["Meetings"];
WSops["RemoveMeeting"] = WS["Meetings"];
WSops["SetWorkSpaceTitle"] = WS["Meetings"];
WSops["GetPermissionCollection"] = WS["Permissions"];
WSops["GetLinks"] = WS["PublishedLinksService"];
WSops["GetPortalSearchInfo"] = WS["Search"];
WSops["GetSearchMetadata"] = WS["Search"];
WSops["Query"] = WS["Search"];
WSops["Status"] = WS["Search"];
WSops["AddGroup"] = WS["usergroup"];
WSops["AddGroupToRole"] = WS["usergroup"];
WSops["AddRole"] = WS["usergroup"];
WSops["GetAllUserCollectionFromWeb"] = WS["usergroup"];
WSops["GetGroupCollection"] = WS["usergroup"];
WSops["GetGroupCollectionFromRole"] = WS["usergroup"];
WSops["GetGroupCollectionFromSite"] = WS["usergroup"];
WSops["GetGroupCollectionFromUser"] = WS["usergroup"];
WSops["GetGroupCollectionFromWeb"] = WS["usergroup"];
WSops["GetGroupInfo"] = WS["usergroup"];
WSops["GetRoleCollection"] = WS["usergroup"];
WSops["GetRoleCollectionFromGroup"] = WS["usergroup"];
WSops["GetRoleCollectionFromUser"] = WS["usergroup"];
WSops["GetRoleCollectionFromWeb"] = WS["usergroup"];
WSops["GetRolesAndPermissionsForCurrentUser"] = WS["usergroup"];
WSops["GetRolesAndPermissionsForSite"] = WS["usergroup"];
WSops["GetUserCollection"] = WS["usergroup"];
WSops["GetUserCollectionFromGroup"] = WS["usergroup"];
WSops["GetUserCollectionFromRole"] = WS["usergroup"];
WSops["GetUserCollectionFromSite"] = WS["usergroup"];
WSops["GetUserCollectionFromWeb"] = WS["usergroup"];
WSops["GetUserInfo"] = WS["usergroup"];
WSops["GetUserLoginFromEmail"] = WS["usergroup"];
WSops["RemoveGroup"] = WS["usergroup"];
WSops["GetCommonMemberships"] = WS["UserProfileService"];
WSops["GetUserColleagues"] = WS["UserProfileService"];
WSops["GetUserLinks"] = WS["UserProfileService"];
WSops["GetUserMemberships"] = WS["UserProfileService"];
WSops["GetUserPinnedLinks"] = WS["UserProfileService"];
WSops["GetUserProfileByName"] = WS["UserProfileService"];
WSops["GetUserProfileCount"] = WS["UserProfileService"];
WSops["GetUserProfileSchema"] = WS["UserProfileService"];
WSops["GetViewCollection"] = WS["Views"];
WSops["DeleteAllVersions"] = WS["Versions"];
WSops["DeleteVersion"] = WS["Versions"];
WSops["GetVersions"] = WS["Versions"];
WSops["RestoreVersion"] = WS["Versions"];
WSops["GetWebPart2"] = WS["WebPartPages"];
WSops["GetWebPartPage"] = WS["WebPartPages"];
WSops["GetWebPartProperties"] = WS["WebPartPages"];
WSops["GetWebPartProperties2"] = WS["WebPartPages"];
WSops["GetListTemplates"] = WS["Webs"];
WSops["GetWeb"] = WS["Webs"];
WSops["GetWebCollection"] = WS["Webs"];
WSops["GetAllSubWebCollection"] = WS["Webs"];
WSops["WebUrlFromPageUrl"] = WS["Webs"];
WSops["GetTemplatesForItem"] = WS["Workflow"];
WSops["GetToDosForItem"] = WS["Workflow"];
WSops["GetWorkflowDataForItem"] = WS["Workflow"];
WSops["GetWorkflowTaskData"] = WS["Workflow"];
WSops["StartWorkflow"] = WS["Workflow"];
// Set up SOAP envelope
var SOAPEnvelope = new Object();
SOAPEnvelope.header = "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'><soap:Body>";
SOAPEnvelope.footer = "</soap:Body></soap:Envelope>";
SOAPEnvelope.payload = "";
// Main function, which calls SharePoint's Web Services directly.
$.fn.SPServices = function(options) {
// If there are no options passed in, use the defaults. Extend replaces each default with the passed option.
var opt = $.extend({}, $.fn.SPServices.defaults, options);
// Put together operation header and SOAPAction for the SOAP call based on which Web Service we're calling
SOAPEnvelope.opheader = "<" + opt.operation + " ";
switch(WSops[opt.operation]) {
case WS["Alerts"]:
SOAPEnvelope.opheader += "xmlns='http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/' >";
SOAPAction = "http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/";
break;
case WS["Meetings"]:
SOAPEnvelope.opheader += "xmlns='http://schemas.microsoft.com/sharepoint/soap/meetings/' >";
SOAPAction = "http://schemas.microsoft.com/sharepoint/soap/meetings/";
break;
case WS["Permissions"]:
SOAPEnvelope.opheader += "xmlns='http://schemas.microsoft.com/sharepoint/soap/directory/' >";
SOAPAction = "http://schemas.microsoft.com/sharepoint/soap/directory/";
break;
case WS["PublishedLinksService"]:
SOAPEnvelope.opheader += "xmlns='http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService/' >";
SOAPAction = "http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService/";
break;
case WS["Search"]:
SOAPEnvelope.opheader += "xmlns='urn:Microsoft.Search' >";
SOAPAction = "urn:Microsoft.Search/";
break;
case WS["usergroup"]:
SOAPEnvelope.opheader += "xmlns='http://schemas.microsoft.com/sharepoint/soap/directory/' >";
SOAPAction = "http://schemas.microsoft.com/sharepoint/soap/directory/";
break;
case WS["UserProfileService"]:
SOAPEnvelope.opheader += "xmlns='http://microsoft.com/webservices/SharePointPortalServer/UserProfileService' >";
SOAPAction = "http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/";
break;
case WS["WebPartPages"]:
SOAPEnvelope.opheader += "xmlns='http://microsoft.com/sharepoint/webpartpages' >";
SOAPAction = "http://microsoft.com/sharepoint/webpartpages/";
break;
case WS["Workflow"]:
SOAPEnvelope.opheader += "xmlns='http://schemas.microsoft.com/sharepoint/soap/workflow/' >";
SOAPAction = "http://schemas.microsoft.com/sharepoint/soap/workflow/";
break;
default:
SOAPEnvelope.opheader += "xmlns='http://schemas.microsoft.com/sharepoint/soap/'>";
SOAPAction = "http://schemas.microsoft.com/sharepoint/soap/";
break;
}
SOAPAction += opt.operation;
SOAPEnvelope.opfooter = "</" + opt.operation + ">";
// Build the URL for the Ajax call based on which operation we're calling
// If the webURL has been provided, then use it, else use the current site
var ajaxURL = ((opt.webURL.length > 0) ? opt.webURL : $().SPServices.SPGetCurrentSite()) +
"/_vti_bin/" + WSops[opt.operation] + ".asmx";
SOAPEnvelope.payload = "";
// Each operation requires a different set of values. This switch statement sets them up in the SOAPEnvelope.payload.
switch(opt.operation) {
// ALERT OPERATIONS
case "GetAlerts":
break;
case "DeleteAlerts":
SOAPEnvelope.payload += "<IDs>";
for (i=0; i < opt.IDs.length; i++) {
SOAPEnvelope.payload += wrapNode("string", opt.IDs[i]);
}
SOAPEnvelope.payload += "</IDs>";
break;
// AUTHENTICATION OPERATIONS
case "Mode":
break;
case "Login":
SOAPEnvelope.payload += wrapNode("username", opt.username);
SOAPEnvelope.payload += wrapNode("password", opt.password);
break;
// COPY OPERATIONS
case "CopyIntoItemsLocal":
SOAPEnvelope.payload += wrapNode("SourceUrl", opt.SourceUrl);
SOAPEnvelope.payload += "<DestinationUrls>";
for (i=0; i < opt.DestinationUrls.length; i++) {
SOAPEnvelope.payload += wrapNode("string", opt.DestinationUrls[i]);
}
SOAPEnvelope.payload += "</DestinationUrls>";
break;
// FORM OPERATIONS
case "GetForm":
SOAPEnvelope.payload += wrapNode("listName", opt.listName);
SOAPEnvelope.payload += wrapNode("formUrl", opt.formUrl);
break;
case "GetFormCollection":
SOAPEnvelope.payload += wrapNode("listName", opt.listName);
break;
// LIST OPERATIONS
case "AddList":
SOAPEnvelope.payload += wrapNode("listName", opt.listName);
SOAPEnvelope.payload += wrapNode("description", opt.description);
SOAPEnvelope.payload += wrapNode("templateID", opt.templateID);
break;
case "CheckInFile":
SOAPEnvelope.payload += wrapNode("pageUrl", opt.pageUrl);
SOAPEnvelope.payload += wrapNode("comment", opt.comment);
SOAPEnvelope.payload += wrapNode("CheckinType", opt.CheckinType);
break;
case "CheckOutFile":
SOAPEnvelope.payload += wrapNode("pageUrl", opt.pageUrl);
SOAPEnvelope.payload += wrapNode("checkoutToLocal", opt.checkoutToLocal);
SOAPEnvelope.payload += wrapNode("lastmodified", opt.lastmodified);
break;
case "DeleteList":
SOAPEnvelope.payload += wrapNode("listName", opt.listName);
break;
case "GetAttachmentCollection":
SOAPEnvelope.payload += wrapNode("listName", opt.listName);
SOAPEnvelope.payload += wrapNode("listItemID", opt.ID);
break;
case "GetList":
SOAPEnvelope.payload += wrapNode("listName", opt.listName);
break;
case "GetListAndView":
SOAPEnvelope.payload += wrapNode("listName", opt.listName);
SOAPEnvelope.payload += wrapNode("viewName", opt.viewName);
break;
case "GetListCollection":
break;
case "GetListContentType":
SOAPEnvelope.payload += wrapNode("listName", opt.listName);
SOAPEnvelope.payload += wrapNode("contentTypeId", opt.contentTypeId);
break;
case "GetListContentTypes":
SOAPEnvelope.payload += wrapNode("listName", opt.listName);
break;
case "GetListItems":
SOAPEnvelope.payload += wrapNode("listName", opt.listName);
SOAPEnvelope.payload += wrapNode("viewFields", opt.CAMLViewFields);
SOAPEnvelope.payload += wrapNode("query", opt.CAMLQuery);
SOAPEnvelope.payload += wrapNode("rowLimit", opt.CAMLRowLimit);
SOAPEnvelope.payload += wrapNode("queryOptions", opt.CAMLQueryOptions);
break;
case "UpdateList":
SOAPEnvelope.payload += wrapNode("listName", opt.listName);
SOAPEnvelope.payload += wrapNode("listProperties", opt.listProperties);
SOAPEnvelope.payload += wrapNode("newFields", opt.newFields);
SOAPEnvelope.payload += wrapNode("updateFields", opt.updateFields);
SOAPEnvelope.payload += wrapNode("deleteFields", opt.deleteFields);
SOAPEnvelope.payload += wrapNode("listVersion", opt.listVersion);
break;
case "UpdateListItems":
SOAPEnvelope.payload += wrapNode("listName", opt.listName);
if(opt.updates.length > 0) {
SOAPEnvelope.payload += wrapNode("updates", opt.updates);
} else {
SOAPEnvelope.payload += "<updates><Batch OnError='Continue'><Method ID='1' Cmd='" + opt.batchCmd + "'>";
for (i=0; i < opt.valuepairs.length; i++) {
SOAPEnvelope.payload += "<Field Name='" + opt.valuepairs[i][0] + "'>" + opt.valuepairs[i][1] + "</Field>";
}
SOAPEnvelope.payload += "<Field Name='ID'>" + opt.ID + "</Field>";
SOAPEnvelope.payload += "</Method></Batch></updates>";
}
break;
// MEETINGS OPERATIONS
case "AddMeeting":
SOAPEnvelope.payload += wrapNode("organizerEmail", opt.organizerEmail);
SOAPEnvelope.payload += wrapNode("uid", opt.uid);
SOAPEnvelope.payload += wrapNode("sequence", opt.sequence);
SOAPEnvelope.payload += wrapNode("utcDateStamp", opt.utcDateStamp);
SOAPEnvelope.payload += wrapNode("title", opt.title);
SOAPEnvelope.payload += wrapNode("location", opt.location);
SOAPEnvelope.payload += wrapNode("utcDateStart", opt.utcDateStart);
SOAPEnvelope.payload += wrapNode("utcDateEnd", opt.utcDateEnd);
SOAPEnvelope.payload += wrapNode("nonGregorian", opt.nonGregorian);
break;
case "CreateWorkspace":
SOAPEnvelope.payload += wrapNode("title", opt.title);
SOAPEnvelope.payload += wrapNode("templateName", opt.templateName);
SOAPEnvelope.payload += wrapNode("lcid", opt.lcid);
SOAPEnvelope.payload += wrapNode("timeZoneInformation", opt.timeZoneInformation);
case "RemoveMeeting":
SOAPEnvelope.payload += wrapNode("recurrenceId", opt.recurrenceId);
SOAPEnvelope.payload += wrapNode("uid", opt.uid);
SOAPEnvelope.payload += wrapNode("sequence", opt.sequence);
SOAPEnvelope.payload += wrapNode("utcDateStamp", opt.utcDateStamp);
SOAPEnvelope.payload += wrapNode("cancelMeeting", opt.cancelMeeting);
case "SetWorkspaceTitle":
SOAPEnvelope.payload += wrapNode("title", opt.title);
// PERMISSION OPERATIONS
case "GetPermissionCollection":
SOAPEnvelope.payload += wrapNode("objectName", opt.objectName);
SOAPEnvelope.payload += wrapNode("objectType", opt.objectType);
break;
// PUBLISHEDLINKSSERVICE OPERATIONS
case "GetLinks":
break;
// SEARCH OPERATIONS
case "GetPortalSearchInfo":
SOAPAction = "http://microsoft.com/webservices/OfficeServer/QueryService/" + opt.operation;
SOAPEnvelope.opheader = "<" + opt.operation + " xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'/>";
break;
case "GetSearchMetadata":
SOAPAction = "http://microsoft.com/webservices/OfficeServer/QueryService/" + opt.operation;
SOAPEnvelope.opheader = "<" + opt.operation + " xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'/>";
break;
case "Query":
SOAPEnvelope.payload += wrapNode("queryXml", escapeHTML(opt.queryXml));
break;
case "Status":
break;
// USERS AND GROUPS OPERATIONS
case "AddGroup":
SOAPEnvelope.payload += wrapNode("groupName", opt.groupName);
SOAPEnvelope.payload += wrapNode("ownerIdentifier", opt.ownerIdentifier);
SOAPEnvelope.payload += wrapNode("ownerType", opt.ownerType);
SOAPEnvelope.payload += wrapNode("defaultUserLoginName", opt.defaultUserLoginName);
SOAPEnvelope.payload += wrapNode("groupName", opt.groupName);
SOAPEnvelope.payload += wrapNode("description", opt.description);
break;
case "AddGroupToRole":
SOAPEnvelope.payload += wrapNode("groupName", opt.groupName);
SOAPEnvelope.payload += wrapNode("roleName", opt.roleName);
break;
case "AddRole":
SOAPEnvelope.payload += wrapNode("roleName", opt.roleName);
SOAPEnvelope.payload += wrapNode("description", opt.description);
SOAPEnvelope.payload += wrapNode("permissionMask", opt.permissionMask);
break;
case "GetAllUserCollectionFromWeb":
break;
case "GetGroupCollectionFromRole":
SOAPEnvelope.payload += wrapNode("roleName", opt.roleName);
break;
case "GetGroupCollection":
SOAPEnvelope.payload += wrapNode("groupNamesXml", opt.groupNamesXml);
break;
case "GetGroupCollectionFromSite":
break;
case "GetGroupCollectionFromUser":
SOAPEnvelope.payload += wrapNode("userLoginName", opt.userLoginName);
break;
case "GetGroupCollectionFromWeb":
break;
case "GetGroupInfo":
SOAPEnvelope.payload += wrapNode("groupName", opt.groupName);
break;
case "GetRoleCollection":
SOAPEnvelope.payload += wrapNode("roleNamesXml", opt.roleNamesXml);
break;
case "GetRoleCollectionFromGroup":
SOAPEnvelope.payload += wrapNode("groupName", opt.groupName);
break;
case "GetRoleCollectionFromUser":
SOAPEnvelope.payload += wrapNode("userLoginName", opt.userLoginName);
break;
case "GetRoleCollectionFromWeb":
break;
case "GetRoleInfo":
SOAPEnvelope.payload += wrapNode("roleName", opt.roleName);
break;
case "GetRolesAndPermissionsForCurrentUser":
break;
case "GetRolesAndPermissionsForSite":
break;
case "GetUserCollection":
SOAPEnvelope.payload += wrapNode("userLoginNamesXml", opt.userLoginNamesXml);
break;
case "GetUserCollectionFromGroup":
SOAPEnvelope.payload += wrapNode("groupName", opt.groupName);
break;
case "GetUserCollectionFromRole":
SOAPEnvelope.payload += wrapNode("roleName", opt.roleName);
break;
case "GetUserCollectionFromSite":
break;
case "GetUserCollectionFromWeb":
break;
case "GetUserInfo":
SOAPEnvelope.payload += wrapNode("userLoginName", opt.userLoginName);
break;
case "GetUserLoginFromEmail":
SOAPEnvelope.payload += wrapNode("emailXml", opt.emailXml);
break;
case "RemoveGroup":
SOAPEnvelope.payload += wrapNode("groupName", opt.groupName);
break;
// USERPROFILESERVICE OPERATIONS
case "GetCommonMemberships":
SOAPEnvelope.payload += wrapNode("accountName", opt.accountName);
break;
case "GetUserColleagues":
SOAPEnvelope.payload += wrapNode("accountName", opt.accountName);
break;
case "GetUserLinks":
SOAPEnvelope.payload += wrapNode("accountName", opt.accountName);
break;
case "GetUserMemberships":
SOAPEnvelope.payload += wrapNode("accountName", opt.accountName);
break;
case "GetUserPinnedLinks":
SOAPEnvelope.payload += wrapNode("accountName", opt.accountName);
break;
case "GetUserProfileByName":
// Note that this operation is inconsistent with the others, using AccountName rather than accountName
if(opt.accountName.length > 0)
SOAPEnvelope.payload += wrapNode("AccountName", opt.accountName)
else
SOAPEnvelope.payload += wrapNode("AccountName", opt.AccountName);
break;
case "GetUserProfileCount":
break;
case "GetUserProfileSchema":
break;
// VIEW OPERATIONS
case "GetViewCollection":
SOAPEnvelope.payload += wrapNode("listName", opt.listName);
break;
// VERSIONS OPERATIONS
case "DeleteAllVersions":
SOAPEnvelope.payload += wrapNode("fileName", opt.fileName);
break;
case "DeleteVersion":
SOAPEnvelope.payload += wrapNode("fileName", opt.fileName);
SOAPEnvelope.payload += wrapNode("fileVersion", opt.fileVersion);
break;
case "GetVersions":
SOAPEnvelope.payload += wrapNode("fileName", opt.fileName);
break;
case "RestoreVersion":
SOAPEnvelope.payload += wrapNode("fileName", opt.fileName);
SOAPEnvelope.payload += wrapNode("fileVersion", opt.fileVersion);
break;
// WEBPARTPAGES OPERATIONS
case "GetWebPart2":
SOAPEnvelope.payload += wrapNode("pageUrl", opt.pageUrl);
SOAPEnvelope.payload += wrapNode("storageKey", opt.storageKey);
SOAPEnvelope.payload += wrapNode("storage", opt.storage);
SOAPEnvelope.payload += wrapNode("behavior", opt.behavior);
break;
case "GetWebPartPage":
SOAPEnvelope.payload += wrapNode("documentName", opt.documentName);
SOAPEnvelope.payload += wrapNode("behavior", opt.behavior);
break;
case "GetWebPartProperties":
SOAPEnvelope.payload += wrapNode("pageUrl", opt.pageUrl);
SOAPEnvelope.payload += wrapNode("storage", opt.storage);
break;
case "GetWebPartProperties2":
SOAPEnvelope.payload += wrapNode("pageUrl", opt.pageUrl);
SOAPEnvelope.payload += wrapNode("storage", opt.storage);
SOAPEnvelope.payload += wrapNode("behavior", opt.behavior);
break;
// WEB OPERATIONS
case "GetWeb":
SOAPEnvelope.payload += wrapNode("webUrl", opt.webURL);
break;
case "GetListTemplates":
break;
case "GetWebCollection":
break;
case "GetAllSubWebCollection":
break;
case "WebUrlFromPageUrl":
SOAPEnvelope.payload += wrapNode("pageUrl", opt.pageURL);
break;
// WORKFLOW OPERATIONS
case "GetTemplatesForItem":
SOAPEnvelope.payload += wrapNode("item", opt.item);
break;
case "GetToDosForItem":
SOAPEnvelope.payload += wrapNode("item", opt.item);
break;
case "GetWorkflowDataForItem":
SOAPEnvelope.payload += wrapNode("item", opt.item);
break;
case "GetWorkflowTaskData":
SOAPEnvelope.payload += wrapNode("item", opt.item);
SOAPEnvelope.payload += wrapNode("listId", opt.listId);
SOAPEnvelope.payload += wrapNode("taskId", opt.taskId);
break;
case "StartWorkflow":
SOAPEnvelope.payload += wrapNode("item", opt.item);
SOAPEnvelope.payload += wrapNode("templateId", opt.templateId);
SOAPEnvelope.payload += wrapNode("workflowParameters", opt.workflowParameters);
break;
default:
break;
}
// Glue together the pieces of the SOAP message
var msg = SOAPEnvelope.header +
SOAPEnvelope.opheader +
SOAPEnvelope.payload +
SOAPEnvelope.opfooter +
SOAPEnvelope.footer;
// Make the Ajax call
$.ajax({
url: ajaxURL, // The relative URL for the AJAX call
async: opt.async, // By default, the AJAX calls are asynchronous. You can specify false to require a synchronous call.
beforeSend: function (xhr) { // Before sending the msg, need to send the request header
xhr.setRequestHeader("SOAPAction", SOAPAction);
},
type: "POST", // This is a POST
data: msg, // Here is the SOAP request we've built above
dataType: "xml", // We're sending XML
contentType: "text/xml; charset='utf-8'", // and this is its content type
complete: opt.completefunc // When the call is complete, do this
});
};
// Defaults added as a function in our library means that the caller can override the defaults
// for their session by calling this function. Each operation requires a different set of options;
// we allow for all in a standardized way.
$.fn.SPServices.defaults = {
operation: "", // The Web Service operation
webURL: "", // URL of the target Web
pageURL: "", // URL of the target page
listName: "", // Name of the list for list operations
description: "", // Description field (used by many operations)
templateID: "", // An integer that specifies the list template to use
viewName: "", // Name of the view for list operations
formUrl: "", // URL of the form for form operations
fileName: "", // Name of the file for file operations
fileVersion: "", // The number of the file version.
ID: 1, // ID of the item for list operations
updates: "", // A Batch element that contains one or more methods for adding, modifying, or deleting items and that can be assigned to a System.Xml.XmlNode object.
comment: "", // Comment for checkins
CheckinType: "", // One of the values 0, 1 or 2, where 0 = MinorCheckIn, 1 = MajorCheckIn, and 2 = OverwriteCheckIn.
checkoutToLocal: "", // A string containing "true" or "false" that designates whether the file is to be flagged as checked out for offline editing.
lastmodified: "", // A string in RFC 1123 date format representing the date and time of the last modification to the file; for example, "20 Jun 1982 12:00:00 GMT".
// For operations requiring CAML, these options will override any abstractions
CAMLViewName: "", // View name in CAML format.
CAMLQuery: "", // Query in CAML format
CAMLViewFields: "", // View fields in CAML format
CAMLRowLimit: 0, // Row limit as a string representation of an integer
CAMLQueryOptions: "<QueryOptions></QueryOptions>", // Query options in CAML format
// Abstractions for CAML syntax
batchCmd: "Update", // Method Cmd for UpdateListItems
valuepairs: [], // Fieldname / Fieldvalue pairs for UpdateListItems
// List options
listProperties: "", // An XML fragment that contains all the list properties to be updated.
newFields: "", // An XML fragment that contains Field elements inside method blocks so that the add operations can be tracked individually.
updateFields: "", // An XML fragment that contains Field elements inside method blocks so that the update operations can be tracked individually.
deleteFields: "", // An XML fragment that contains Field elements specifying the names of the fields to delete inside method blocks so that the delete operations can be tracked individually.
listVersion: "", // A string that contains the version of the list that is being updated so that conflict detection can be performed.
contentTypeId: "", // A string that represents the content type ID of the content type.
username: "", // Username for the Login operation
password: "", // Password for the Login operation
accountName: "", // User login in domain/user format for UserProfileService operations
AccountName: "", // User login in domain/user format for UserProfileService operations
userLoginName: "", // User login in domain/user format for user operations
groupNamesXml: "", // XML that specifies one or more group definition names
groupName: "", // A string that contains the name of the group definition
ownerIdentifier: "", // A string that contains the user name (DOMAIN\User_Alias) of the owner for the group
ownerType: "", // A string that specifies the type of owner, which can be either user or group
defaultUserLoginName: "", // A string that contains the user name (DOMAIN\User_Alias) of the default user for the group
roleNamesXml: "", // XML that specifies one or more role definition names
roleName: "", // A string that contains the name of the role definition
permissionMask: "", // A string representation of the 32-bit integer in decimal format that represents a Microsoft.SharePoint.SPRights value
userLoginNamesXml: "", // XML that contains information about the users
emailXml: "", // A string that contains email address
objectName: "", // objectName for operations which require it
objectType: "List", // objectType for operations which require it
IDs: null, // List of GUIDs
SourceUrl: "", // Source URL for copy operations
DestinationUrls: [], // Array of destination URLs for copy operations
documentName: "", // The name of the Web Part Page.
behavior: "Version3", // An SPWebServiceBehavior indicating whether the client supports Windows SharePoint Services 2.0 or Windows SharePoint Services 3.0: {Version2 | Version3 }
storageKey: "", // A GUID that identifies the Web Part
storage: "Shared", // A Storage value indicating how the Web Part is stored: {None | Personal | Shared}
item: "", // The URL location of an item on which a workflow is being run.
listId: "", // Globally unique identifier (GUID) of a task list containing the task
taskId: "", // Unique identifier (ID) of a task
templateId: "", // Globally unique identifier (GUID) of a template
workflowParameters: "", // The initiation form data
fClaim: false, // Specifies if the action is a claim or a release. Specifies true for a claim and false for a release.
queryXml: "", // A string specifying the search query XML
cancelMeeting: true, // true to delete a meeting; false to remove its association with a Meeting Workspace site
lcid: "", // The LCID (locale identifier) to use when the site is created.
location: "", // The location of the meeting.
nonGregorian: false, // true if the calendar is set to a format other than Gregorian; otherwise, false.
organizerEmail: "", // The e-mail address, specified as [email protected], for the meeting organizer.
recurrenceId: 0, // The recurrence ID for the meeting that needs its association removed. This parameter can be set to 0 for single-instance meetings.
sequence: 0, // An integer that is used to determine the ordering of updates in case they arrive out of sequence. Updates with a lower-than-current sequence are discarded. If the sequence is equal to the current sequence, the latest update are applied.
templateName: "", // The name of the template to use when the site is created. See Windows SharePoint Services template naming guidelines for specifying a configuration within a template.
timeZoneInformation: "", // The time zone information to use when the site is created.
title: "", // The title (subject) of the meeting OR The title for the Meeting Workspace site that will be created.
uid: "", // A persistent GUID for the calendar component.
utcDateStamp: "", // This parameter needs to be in the UTC format (for example, 2003-03-04T04:45:22-08:00).
utcDateStart: "", // The start date and time for the meeting, expressed in UTC.
utcDateEnd: "", // The end date and time for the meeting, expressed in Coordinated Universal Time (UTC).
async: true, // Allow the user to force async
completefunc: null // Function to call on completion
};
// Function to determine the current Web's URL. We need this for successful Ajax calls.
// The function is also available as a public function.
$.fn.SPServices.SPGetCurrentSite = function() {
// Do we already know the current site?
if(thisSite.length > 0) return thisSite;
var msg = SOAPEnvelope.header +
"<WebUrlFromPageUrl xmlns='http://schemas.microsoft.com/sharepoint/soap/' ><pageUrl>" +
((location.href.indexOf("?") > 0) ? location.href.substr(0, location.href.indexOf("?")) : location.href) +
"</pageUrl></WebUrlFromPageUrl>" +
SOAPEnvelope.footer;
$.ajax({
async: false, // Need this to be synchronous so we're assured of a valid value
url: "/_vti_bin/Webs.asmx",
beforeSend: function (xhr) {
xhr.setRequestHeader("SOAPAction",
"http://schemas.microsoft.com/sharepoint/soap/WebUrlFromPageUrl");
},
type: "POST",
data: msg,
dataType: "xml",
contentType: "text/xml; charset=\"utf-8\"",
complete: function (xData, Status) {
thisSite = $(xData.responseXML).find("WebUrlFromPageUrlResult").text();
}
});
return thisSite; // Return the URL
};
// Function to set up cascading dropdowns on a SharePoint form
// (Newform.aspx, EditForm.aspx, or any other customized form.)
$.fn.SPServices.SPCascadeDropdowns = function(options) {
var opt = $.extend({}, {
relationshipWebURL: "", // [Optional] The name of the Web (site) which contains the relationships list
relationshipList: "", // The name of the list which contains the parent/child relationships
relationshipListParentColumn: "", // The internal name of the parent column in the relationship list
relationshipListChildColumn: "", // The internal name of the child column in the relationship list
relationshipListSortColumn: "", // [Optional] If specified, sort the options in the dropdown by this column,
// otherwise the options are sorted by relationshipListChildColumn
parentColumn: "", // The display name of the parent column in the form
childColumn: "", // The display name of the child column in the form
CAMLQuery: "", // [Optional] For power users, this CAML fragment will be Anded with the default query on the relatedList
promptText: "Choose {0}...", // [Optional] Text to use as prompt. If included, {0} will be replaced with the value of childColumn
completefunc: null, // Function to call on completion of rendering the change.
debug: false // If true, show error messages; if false, run silent
}, options);
// Find the parent column's select (dropdown)
var parentSelect = new dropdownCtl(opt.parentColumn);
if(parentSelect.Obj.html() == null && opt.debug) { errBox("SPServices.SPCascadeDropdowns", "parentColumn: " + opt.parentColumn, "Column not found on page"); return; }
switch(parentSelect.Type) {
// Plain old select
case "S":
parentSelect.Obj.bind("change", function() {
cascadeDropdown(opt);
});
// Fire the change to set the allowable values
parentSelect.Obj.change();
break;
// Input / Select hybrid
case "C":
parentSelect.Obj.bind("propertychange", function() {
cascadeDropdown(opt);
});
// Fire the change to set the allowable values
parentSelect.Obj.trigger("propertychange");
break;
// Multi-select hybrid
case "M":
// Handle the dblclick on the candidate select
parentSelect.Obj.bind("dblclick", function() {
cascadeDropdown(opt);
});
// Handle the dblclick on the selected values
parentSelections = parentSelect.Obj.closest("span").find("select:[Title='" + opt.parentColumn + " selected values']");
parentSelections.bind("dblclick", function() {
cascadeDropdown(opt);
});
// Handle a button click
parentSelect.Obj.closest("span").find("button").each(function() {
$(this).bind("click", function() {
cascadeDropdown(opt);
});
});
// Fire the change to set the allowable values initially
cascadeDropdown(opt);
break;
default:
break;
}
};
function cascadeDropdown(opt) {
var choices = "";
var childSelectSelected = null;
var parentSelectSelected = [];
var master;
var MultiLookupPickerdata;
var newMultiLookupPickerdata;
var childColumnRequired;
// Find the parent column's select (dropdown)
var parentSelect = new dropdownCtl(opt.parentColumn);
// Get the parent column selection(s)
switch(parentSelect.Type) {
case "S":
parentSelectSelected.push(parentSelect.Obj.find("option:selected").text());
break;
case "C":
parentSelectSelected.push(parentSelect.Obj.attr("value"));
break;
case "M":
parentSelections = parentSelect.Obj.closest("span").find("select:[Title='" + opt.parentColumn + " selected values']");
$(parentSelections).find("option").each(function() {
parentSelectSelected.push($(this).html());
});
break;
default:
break;
}
// If the selection hasn't changed, then there's nothing to do right now. This is useful to reduce
// the number of Web Service calls when the parentSelect.Type = "C" or "M", as there are multiple propertychanges
// which don't require any action. The attribute will be unique per child column in case there are
// multiple children for a given parent.
if(parentSelect.Obj.attr("cascadeDropdownSelected_" + opt.childColumn) == parentSelectSelected.join(";#")) return;
parentSelect.Obj.attr("cascadeDropdownSelected_" + opt.childColumn, parentSelectSelected.join(";#"));
// Find the child column's select (dropdown)
var childSelect = new dropdownCtl(opt.childColumn);
if(childSelect.Obj.html() == null && opt.debug) { errBox("SPServices.SPCascadeDropdowns", "childColumn: " + opt.childColumn, "Column not found on page"); return; }
// Get the current child column selection, if there is one
switch(childSelect.Type) {
case "S":
childSelectSelected = childSelect.Obj.find("option:selected").val();
break;
case "C":
childSelectSelected = childSelect.Obj.attr("value");
break;
case "M":
MultiLookupPickerdata = childSelect.Obj.closest("span").find("input:[name$='MultiLookupPicker$data']");
master = window[childSelect.Obj.closest("tr").find("button:[id$='AddButton']").attr("id").replace(/AddButton/,'MultiLookupPicker_m')];
currentSelection = childSelect.Obj.closest("span").find("select:[Title='" + opt.childColumn + " selected values']");
// Clear the master
master.data = "";
break;
default:
break;
}
// When the parent column's selected option changes, get the matching items from the relationship list
// Get the list items which match the current selection
var sortColumn = (opt.relationshipListSortColumn.length > 0) ? opt.relationshipListSortColumn : opt.relationshipListChildColumn;
var camlQuery = "<Query><OrderBy><FieldRef Name='" + sortColumn + "'/></OrderBy><Where>";
if(opt.CAMLQuery.length > 0) camlQuery += "<And>";
// Build up the criteria for inclusion
if(parentSelectSelected.length == 0) {
// Handle the case where no values are selected in multi-selects
camlQuery += "<Eq><FieldRef Name='" + opt.relationshipListParentColumn + "'/><Value Type='Text'></Value></Eq>";
} else if(parentSelectSelected.length == 1) {
// Only one value is selected
camlQuery += "<Eq><FieldRef Name='" + opt.relationshipListParentColumn + "'/><Value Type='Text'>" + escapeColumnValue(parentSelectSelected[0]) + "</Value></Eq>";
} else {
var compound = (parentSelectSelected.length > 2) ? true : false;
for(i=0; i < (parentSelectSelected.length - 1); i++) {
camlQuery += "<Or>";
}
for(i=0; i < parentSelectSelected.length; i++) {
camlQuery += "<Eq><FieldRef Name='" + opt.relationshipListParentColumn + "'/><Value Type='Text'>" + escapeColumnValue(parentSelectSelected[i]) + "</Value></Eq>";
if(i>0 && (i < (parentSelectSelected.length - 1)) && compound) camlQuery += "</Or>";
}
camlQuery += "</Or>";
}
if(opt.CAMLQuery.length > 0) camlQuery += opt.CAMLQuery + "</And>";
camlQuery += "</Where></Query>";
// Get information about the childColumn from the current list
$().SPServices({
operation: "GetList",
async: false,
listName: listNameFromUrl(),
completefunc: function(xData, Status) {
$(xData.responseXML).find("Fields").each(function() {
$(xData.responseXML).find("Field").each(function() {
// Determine whether childColumn is Required
if($(this).attr("Name") == opt.childColumn) childColumnRequired = ($(this).attr("Required") == "TRUE") ? true : false;
});
});
}
});
$().SPServices({
operation: "GetListItems",
// Force sync so that we have the right values for the child column onchange trigger
async: false,
webURL: opt.relationshipWebURL,
listName: opt.relationshipList,
// Filter based on the currently selected parent column's value
CAMLQuery: camlQuery,
// Only get the parent and child columns
CAMLViewFields: "<ViewFields><FieldRef Name='" + opt.relationshipListParentColumn + "' /><FieldRef Name='" + opt.relationshipListChildColumn + "' /></ViewFields>",
// Override the default view rowlimit and get all appropriate rows
CAMLRowLimit: 0,
completefunc: function(xData, Status) {
$(xData.responseXML).find("faultcode").each(function() {
if(opt.debug) errBox("SPServices.SPCascadeDropdowns",
"relationshipListParentColumn: " + opt.relationshipListParentColumn + " or " +
"relationshipListChildColumn: " + opt.relationshipListChildColumn,
"Not found in relationshipList " + opt.relationshipList);
return;
});
// Add an explanatory prompt
switch(childSelect.Type) {
case "S":
childSelect.Obj.attr({ length: 0 })
// If the column is required or the promptText option is empty, don't add the "(None) option
if(!childColumnRequired && opt.promptText.length > 0) childSelect.Obj.append("<option value='0'>" + opt.promptText.replace(/\{0\}/g, opt.childColumn) + "</option>");
break;
case "C":
// If the column is required, don't add the "(None)" option
choices = childColumnRequired ? "" : "(None)|0";
childSelect.Obj.attr("value", "");
break;
case "M":
childSelect.Obj.attr({ length: 0 });
newMultiLookupPickerdata = "";
break;
default:
break;
}
// Add an option for each child item
$(xData.responseXML).find("[nodeName=z:row]").each(function() {
// If relationshipListChildColumn is a Lookup column, then the ID should be for the Lookup value,
// else the ID of the relationshipList item
var thisOptionId = ($(this).attr("ows_" + opt.relationshipListChildColumn).indexOf(";#") > 0) ?
$(this).attr("ows_" + opt.relationshipListChildColumn).split(";#")[0] :
$(this).attr("ows_ID");
// If relationshipListChildColumn is a Lookup column, then strip off the leading ID;# on the value
var thisOptionValue = ($(this).attr("ows_" + opt.relationshipListChildColumn).indexOf(";#") > 0) ?
$(this).attr("ows_" + opt.relationshipListChildColumn).split(";#")[1] :
$(this).attr("ows_" + opt.relationshipListChildColumn);
switch(childSelect.Type) {
case "S":
var selected = ($(this).attr("ows_ID") == childSelectSelected) ? " selected='selected'" : "";
childSelect.Obj.append("<option" + selected + " value='" + thisOptionId + "'>" + thisOptionValue + "</option>");
break;
case "C":
if (thisOptionValue == childSelectSelected) childSelect.Obj.attr("value", childSelectSelected);
choices = choices + ((choices.length > 0) ? "|" : "") + thisOptionValue + "|" + thisOptionId;
break;
case "M":
childSelect.Obj.append("<option value='" + thisOptionId + "'>" + thisOptionValue + "</option>");
newMultiLookupPickerdata += thisOptionId + "|t" + thisOptionValue + "|t |t |t";
break;
default:
break;
}
});
switch(childSelect.Type) {
case "S":
childSelect.Obj.trigger("change");
break;
case "C":
childSelect.Obj.attr("choices", choices);
childSelect.Obj.trigger("propertychange");
break;
case "M":
MultiLookupPickerdata.attr("value", newMultiLookupPickerdata);
// Clear any prior selections that are no longer valid
$(currentSelection).find("option").each(function() {
var thisSelected = $(this);
$(this).attr("selected", "selected");
$(childSelect.Obj).find("option").each(function() {
if($(this).html() == thisSelected.html()) thisSelected.attr("selected", "");
});
});
GipRemoveSelectedItems(master);
// Hide any options in the candidate list which are already selected
$(childSelect.Obj).find("option").each(function() {
var thisSelected = $(this);
$(currentSelection).find("option").each(function() {
if($(this).html() == thisSelected.html()) thisSelected.remove();
});
});
GipAddSelectedItems(master);
// Set master.data to the newly allowable values
master.data = GipGetGroupData(newMultiLookupPickerdata);
break;
default:
break;
}
}
});
// If present, call completefunc when all else is done
if(opt.completefunc != null) opt.completefunc();
}
// Function to display related information when an option is selected on a form.
$.fn.SPServices.SPDisplayRelatedInfo = function(options) {
var opt = $.extend({}, {
columnName: "", // The display name of the column in the form
relatedWebURL: "", // [Optional] The name of the Web (site) which contains the related list
relatedList: "", // The name of the list which contains the additional information
relatedListColumn: "", // The internal name of the related column in the related list
relatedColumns: [], // An array of related columns to display
displayFormat: "table", // The format to use in displaying the related information. Possible values are: "table".
headerCSSClass: "ms-vh2", // CSS class for the table headers
rowCSSClass: "ms-vb", // CSS class for the table rows
CAMLQuery: "", // [Optional] For power users, this CAML fragment will be <And>ed with the default query on the relatedList
numChars: 0, // If used on an input column (not a dropdown), no matching will occur until at least this number of characters has been entered
matchType: "Eq", // If used on an input column (not a dropdown), type of match. Can be any valid CAML comparison operator, most often "Eq" or "BeginsWith"
completefunc: null, // Function to call on completion of rendering the change.
debug: false // If true, show error messages; if false, run silent
}, options);
// Find the column's select (dropdown)
var columnSelect = new dropdownCtl(opt.columnName);
if(columnSelect.Obj.html() == null && opt.debug) {
errBox("SPServices.SPDisplayRelatedInfo",
"columnName: " + opt.columnName,
"Column not found on page");