I have 3 lists: Schools, Interactions, Contacts

In the new form for a Interaction item I have a lookup field displaying a long list of contacts, however I need to filter this list to only display contacts associated with the particular school that the interaction is associated with.

Both the Contacts and the Interaction have a school_ID field and I basically need to filter the contacts lookup field to only display contacts WHERE contact.school_ID = Interactions.school_id (to use SQL lingo) however I'm not sure how to achieve that for a form.

I have found this method which looks relevant, but I'm not sure how exactly to customize it to compare school_ids http://spservices.codeplex.com/discussions/207947

here's what I have come up with so far

  relationshipWebURL: "",
  relationshipList: "Contacts",
  relationshipListChildColumn: "School_ID",
  relationshipListSortColumn: "",
  childColumn: "Interaction Contacts",
  CAMLQuery: "<Eq><FieldRef Name="school_id" /><Value Type="text">     
  debug: true

Should I be using any encoding for white spaces in JavaScript-method parameters?

<FieldRef Name="school_id" 

would retrieve the school_id from the item being looked up, ie. contact (correct?) but How would I retrieve the school_id value from the Interaction item? which the Interaction item itself which the form is for.

  • 1
    This lists all the parameters. – wjervis May 7 '15 at 15:16
  • I've seen this, but unfortunatly still don't fully understand how to actually implement it for a lookup filter and not Cascading (got the cascading to work elsewhere) – Essah May 11 '15 at 8:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.