I have two lists which are linked. When I want to add a record to the second (child) list I need to get data from the first list (parent). My parent list "PIR" has the fields PIR, number and source. The child list "SIR" has the fields SIR, PIR2SIR, number. The field lookup field PIR2SIR is linked to PIR in the parent list.

example: PIR: this is my question. number: 1 source: CNN

SIR: this is my sub question. PIR2SIR: this is my question. number: 1.1 source: CNN

Now I want to add a new SIR record. When I load the Newform I need to have the number of the last SIR record, being 1.1. because I want to autofill the number of the new record like 1.2. I am using jquery to do this.

The problem is that more PIR questions can be number 1, depending on the source. I am breaking my head to get this done.


  • Are you aiming for something like Marks linked lists,? sharepointhillbilly.com/_layouts/mobile/… Commented Jun 21, 2018 at 10:04
  • Kasper, yes thatś what I am trying. Although I need not just the parentID but also something like "number" from the parent.
    – Marco
    Commented Jun 25, 2018 at 10:22

2 Answers 2


Use Mark Rackleys linked lists as a base and extend with the additional fields


I got this working with a camlQuery.

camlQuery.set_viewXml("<View><Query><Where><And><Eq><FieldRef Name=\'Eenheid\'/><Value Type=\'Text\'>" + myUnit + "</Value></Eq><Eq><FieldRef Name= \'PIR2SIR\' LookupId='TRUE'/><Value Type=\'Lookup\'>" + parentID + "</Value></Eq></And></Where><OrderBy><FieldRef Name=\'Volgnr\' Ascending=\'False\' /></OrderBy></Query><RowLimit>1</RowLimit></View>");

Thanks for the help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.