2 Replies Latest reply on Jan 12, 2020 6:21 PM by stevedrummond

    VMWare vRO Workflow

    Bunty11 Enthusiast

      My OutPut Variable in VRO has this data in single line.

      like this



      i want to format that and keep it on different lines like this and sent email.vro






      how to format the variable which has this data in javascript ?

        • 1. Re: VMWare vRO Workflow
          iiliev Champion
          VMware EmployeesCommunity Warriors



          Check the following snippet which shows how all dot characters ('.') in a string can be replaced with newline characters ('\n').


          var x = "aaaaaa.bbbbbbb.ccccc.ddddd";
          System.log("original value: " + x);
          var y = x.replace(/\./g, "\n");
          System.log("formatted value: " + y);
          1 person found this helpful
          • 2. Re: VMWare vRO Workflow
            stevedrummond Hot Shot

            If you're sending a HTML email (as opposed to text) you'll want to replace them with <br /> and not the newline character.


            const body = myVar.replace(/\./g, '<br />');