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

#30508
MikeS
Participant

I have done more testing and added back in a Date field without the numeric prefix. That works fine. See script and screen shot.

However the Date field with the numeric prefix seems to be the issue. FIN has been checked. Still can’t get the console.log script to run w/o error even with the replaced line in the script.

Is there another way to characterize the numeric date FIN in the 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”: [“TNDecision”,”TNPOC”,”TNDate”,”123Date”]
});
var TNDecision1 = item.TNDecision;
if(TNDecision1 === null){
TNDecision1 = “[empty]”;
}
var TNPOC1 = item.TNPOC;
if(TNPOC1 === null){
TNPOC1 = “[empty]”;
}
var TNDate1 = item.TNDate;
if(TNDate1 === null){
TNDate1 = “[empty]”;
}else{
TNDate1 = new Date(item.TNDate.split(” “).join(“T”)).toLocaleDateString();
}
var Date123 = item[“123Date”];
if(Date123 === null){
Date123 = “[empty]”;
}else{
Date123 = new Date(item[“123Date”].split(” “).join(“T”)).toLocaleDateString();
}
var b = [];
b.push(“TNDate: ” + TNDate1);
b.push(“TNDecision: ” + TNDecision1);
b.push(“TNPOC: ” + TNPOC1);
b.push(“123Date: ” + Date123);
jQuery(a).append(“<div>” + b.join(“<br>”) + “</div>”);
});
// Separate each item
jQspjs(“#dffs_TNLookup .ms-formbody”).contents().filter(function () {
return (this.nodeType === 3 && this.nodeValue === “; “);
}).replaceWith(“<hr>”);