Null in mutli-line text box

Comments

3 comments

  • Rainer Grabowski

    Hi Jodi,

    yes, possible. Can you please share your current calculation (as screenshot and as text copy)?.

    Rainer

    0
    Comment actions Permalink
  • Jodi Christensen

    @Recommended Mail Name 1+"\n"+@Recommended Mail Name 2+"\n"+@Preferred Street 1+"\n"+@Preferred Street 2+"\n"+@Preferred Street 3+"\n"+@Preferred City+" ,"+@Preferred State+" "+@Preferred Zip

    0
    Comment actions Permalink
  • Rainer Grabowski

    Hello Jodi,

    this is one possible solution:

    var mn1 = @Recommended Mail Name 1;
    var mn1 = mn1 == null ? "" : mn1 + "\n";
    var mn2  = @Recommended Mail Name 2;
    var mn2 = mn2 == null ? "" : mn2 + "\n";
    var ps1 =  @Preferred Street 1;
    var ps1 = ps1 == null ? "" : ps1 + "\n";
    var ps2 = @Preferred Street 2;
    var ps2 = ps2 == null ? "" : ps2 + "\n";
    var ps3 = @Preferred Street 3;
    var ps3 = ps3 == null ? "" : ps3 + "\n";
    var pcsz = @Preferred City+" ,"+@Preferred State+" "+@Preferred Zip;
    mn1 + mn2 + ps1 +ps2 + ps3 + pcsz

    Another one:

    var arr = [@Recommended Mail Name 1,@Recommended Mail Name 2,@Preferred Street 1,@Preferred Street 2,@Preferred Street 3,(@Preferred City+" ,"+@Preferred State+" "+@Preferred Zip)];
    arr.filter(function (i) {return i.length > 0;}).join("\n")

    Rainer

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk