- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2019 09:49 AM
We are in New York and I am trying to add line breaks to a string field. I can get the values to populate but not the line breaks. I tried following this post from 5 years ago on Line Breaks in Business Rules but it does not work. Here is my code
(function executeRule(current, previous /*null when async*/) {
(function executeRule(current, previous /*null when async*/) {
var cin = current.u_ciname.getDisplayValue();
var civ = current.u_civersion.getDisplayValue();
var civv = current.u_civendor.getDisplayValue();
var cio = current.u_ciowner.getDisplayValue();
var ciiao = current.u_ci_itappowner.getDisplayValue();
var lnbrk = "\n";
/*if(civ != ""){*/
var civd = "Version: " + civ + "\n";
/*}*/
/*if(civv != ""){*/
var civvd = "Vendor: " + civv + "\n";
/*}*/
/*if(cio != ""){*/
var ciod = "Owner: " + cio + "\n";
/*}*/
/*if(ciiao != ""){*/
var ciiaod = "IT Application Owner: " + ciiao + "\n";
/*}*/
current.u_kb_ci_name.setValue(cin+civd + civvd+ ciod+ ciiaod);
})(current, previous);
This code results in this without line breaks
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2019 09:56 AM
Did you try <br> instead of \n
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2019 09:56 AM
Did you try <br> instead of \n
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2019 09:59 AM
Just tried, worked!!
