Reply To: Child form

Home Forums General discussion Child form Reply To: Child form

#31266
Leonid
Participant

    The only function related to vLookup is:
    `function vlookupChildAddedCallback(){
    var res = spjs.utility.queryItems({
    “listName”: “LCR Answers”,
    “query”: “<Where><And><Eq><FieldRef Name=’_vLookupParentID’ /><Value Type=’Text’>” + getFieldValue(“_vLookupID”) +
    “</Value></Eq><Contains><FieldRef Name=’FileRef’ /><Value Type=’Text’>” + LCR_ID +
    “</Value></Contains></And></Where><OrderBy><FieldRef Name=’ID’ Ascending=’FALSE’ /></OrderBy>”,
    “rowLimit”: 1,
    “viewFields”: [‘ID’, ‘Title’, ‘FileRef’],
    “scope”:”RecursiveAll”
    });
    if(res.count > 0){
    //debugger;
    var id = res.items[0].ID;
    var title = res.items[0].Title;
    setFieldValue(title.replace(” “, “”) + “ID”, id);
    }
    }

    and the rule is attached

    • This reply was modified 4 years, 2 months ago by Leonid.
    Attachments: