- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2013 11:41 AM
if you are using an advanced script in a catalog task.. how do you insert a line break?
for example
task.description = 'This is line one';
task.description = task.description + 'what code goes here' + 'This is line two';
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2013 12:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2013 11:47 AM
Hi.
You include \n in your script
ie:
task.description = task.description + '\n' + 'This is line two';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2013 11:50 AM
Though all of that can be written as one line.
task.description = var1 + '\n' + var2;
Or you don't even need to break them apart if you're using one long string. If you're using two variables, you need to use the example above. If you're using one large string that you want broken into two pieces, you don't need to overcomplicate it.
task.description = 'data for line 1 here\ndata for line 2';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2013 11:57 AM
/n isn't working and as written it runs it all into a run on block.. which since each line is a separate step isn't a good idea
when i put
task.description = task.description + '/n' + 'This is line two';
i get "line 1 /n line2"
as one long description not on lines inside of the description block
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2013 12:06 PM
Your slash in front of the n is the wrong way. It needs to be \n