adding multiple column data to one multiline text box

Forums General discussion adding multiple column data to one multiline text box

This topic contains 2 replies, has 2 voices, and was last updated by  Leon Perdue 8 months, 3 weeks ago.

  • Author
  • #21039

    Leon Perdue

    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(){
     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
     if(clt == "option1"){
     setFieldValue("Claim_Comments","\nCall Type: "+cat "\nClaim Type: "+clt);
  • #21045

    Alexander Bautz

    You have defined all your variables as local to the function compileNotes, but you try to use clt outside this function. Maybe you should move the bottom if up inside the function?


  • #21053

    Leon Perdue

    that was it. complete oversight on my part. Thank you as always!

You must be logged in to reply to this topic.