Reply To: Show additional information on multilookup items in DispForm

Forums Dynamic Forms for SharePoint Show additional information on multilookup items in DispForm Reply To: Show additional information on multilookup items in DispForm

#30472
MikeS
Participant

I keep getting a field value of NULL returned for the Related Fields, or an error message to that effect.

My script:
`jQspjs(“#dffs_TNLookup .ms-formbody a”).each(function (i, a) {
var id = GetUrlKeyValue(“ID”, false, a.href);
var listId = GetUrlKeyValue(“ListId”, false, a.href);
var item = spjs.utility.getItemByID({
“listName”: listId,
“id”: id,
“viewFields”: [“TNLookup_x003a_TNDecision”,”TNLookup_x003a_TNPOC”,”TNLookup_x003a_TNDate”]
});
var b = [];
b.push(“<br>TNDecision: ” + item.TNLookup_x003a_TNDecision);
b.push(“TNPOC: ” + (item.TNLookup_x003a_TNPOC !== null ? item.TNLookup_x003a_TNPOC : “”));
b.push(“TNDate: ” + new Date(item.TNLookup_x003a_TNDate.split(” “).join(“T”)).toLocaleDateString());
jQuery(a).append(b.join(“<br>”));
});
// Separate each item
jQspjs(“#dffs_TNLookup .ms-formbody”).contents().filter(function () {
return (this.nodeType === 3 && this.nodeValue === “; “);
}).replaceWith(“<hr>”);’

Screen shots are attached.

Thanks for your help. The UI looks like it will work fine once this is resolved.
Mike

  • This reply was modified 4 months, 2 weeks ago by MikeS.