Quantcast
Viewing all articles
Browse latest Browse all 6517

New Post: Getting going with SPServices.SPCascadeDropdowns

Have just started using SPServices (so be gentle, please) with SP Online/O365 (SP 2013) and am trying to get started with the SPCascadeDropdowns function; nothing too fancy, just trying to get a 'hello world' level event achieved, but am not getting any results. I am using jquery-1.10.1.min.js (my own minified copy) and jquery.SPServices-2013.01.min.js

My list relationships are as follows:

Branch list (List name: Branch) containing 'Branch Name' (display name = 'BranchTitle', static name = 'Title')

Job list (List name: Job) containing 'Job Title' (display name = 'Job Title', static name = 'Title') - job titles will be unique

Branch Job list (list name: BranchJob) containing SP lookup columns to 'Branch' (source: Branch) (display name = 'Branch', static name ='Branch') and Job Title (source: Job)(display name = 'Job Title', static name = 'Job%5Fx0020%5FTitle', which I have translated to 'Job_x0020_Title').

The purpose of the Branch Job list is to provide a valid list of jobs at each branch.

Now to the nub of my request for assistance.

I am customising a new list form which I want to:

a) filter the list of available branches based on a user's profile (I'm planning to use the 'SPServices.SPFilterDropdown' function for this later), and

b) once a) is selected I am trying to filter a list of jobs to only those available at the branch selected in a).

Column a) is using a look up column to the Branch List and column b) is using a look up column to the Branch Job list

The code I have got so far is:
$().SPServices.SPCascadeDropdowns({
      relationshipWebURL: "",
      relationshipList: "Branch Job",
      relationshipListParentColumn: "Branch",
      relationshipListChildColumn: "Job_x0020_Title",
      relationshipListSortColumn: "",
      parentColumn: "Branch", //column display name in my new list form
      childColumn: "Position Required", //column display name in my new list form to hold the job title
      CAMLQuery: "",
      CAMLQueryOptions: "<QueryOptions><IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns></QueryOptions>", // Added in 2013.01
      listName: $().SPServices.SPListNameFromUrl(), 
      promptText: "",
      simpleChild: false,           // Added in v0.6.2
      selectSingleOption: false,        // Added in v0.6.2
      matchOnId: true,          // Added in v0.7.1
      completefunc: null,
      debug: true
    });
I haven't sought to pre-filter my column a) yet, so I can better test the column b) when I change the branch, so a) still has the results of the generic lookup column settings, but column b) is not returning any values at all. I have tweaked various parameters in my code without success.

I'm sure it's going to be something simple, and I'm happy to receive some tough love, but could really use some advise as to where I'm going wrong!

Thanks

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>