- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 11:15 AM
Hi can anyone help me with scenario for the catalog item variable (list type) to be displayed in description of sc task in row wise.
i have written a script :
task.description = current.variables.requested_role.getDisplayValue();
but it is displaying as
For example:
asset manager,change manager,incident manager,problem manager .
It should display as:
Asset manager
change manager
incident manager
problem manager
I want to display as list in description field
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 11:51 AM
Hi @raj765_32 ,
I think you can achieve this as below.
Your final script will be like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 11:56 AM
Try this:
var desc = current.variables.requested_role.getDisplayValue();
desc = desc.toString().replace(/,/g, '\n'); //replace all commas in the value with a carriage return character
task.description = desc;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 11:51 AM
Hi @raj765_32 ,
I think you can achieve this as below.
Your final script will be like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 11:56 AM
Try this:
var desc = current.variables.requested_role.getDisplayValue();
desc = desc.toString().replace(/,/g, '\n'); //replace all commas in the value with a carriage return character
task.description = desc;