Hi Alex,
Looking for your help on this.. I am trying to create a comment box which will include certain data columns based on the option chosen within one dropdown.
in essence i am trying to accomplish this:
If Claim Type = Option 1 then place columns 1,2,3 in the comments box.
If Claim Type = Option 2 then place columns 2,4,5 in the comments box.
Here is the code i am working with which is not working. I am still working on the first if statement. I am getting an error that clt is not defined.
function compileNotes(){
var
u = spjs.utility.userInfo(_spPageContextInfo.userId),
d = getFieldValue("Date"),
cc = getFieldValue("Claim_Comments"),
//Call Type
cat = getFieldValue("Call_Type"),
//Claim Type
clt = getFieldValue("Claim_Type"),
//Preferred Contact Method
cm = getFieldValue("Contact_Method"),
//Did you provide the disclosure?
dp = getFieldValue("Disclosure_Provided"),
//Additional Info
ai = getFieldValue("Additional_Info")
;
// clear comments
setFieldValue("Claim_Comments","");
}
if(clt == "option1"){
setFieldValue("Claim_Comments","\nCall Type: "+cat "\nClaim Type: "+clt);
}