- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 06:34 AM
How can I enter line breaks within Plain Text if using a 'String' field in a Decision Table?
Hi Community colleagues.
How can I create line breaks / spacing, when I am entering Plain Text within a 'String' field, within a Decision Table, in conjunction with Flow Designer?
Is this even possible?
So it is a simple 'String' Field type within a Decision Table and I want the Plain Text that I am entering into this String field, to have line break spacing, so that I can split out between paragraphs.
I don't even know if this is possible or do I need to use a different approach within a Decision Table, to achieve this.
I am using Flow Designer + Decision Tables, in order to get my output and insert the Plain Text into the Description field for the Catalog Task, I am not using Workflow.
Many thanks for any help / guidance - always appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 06:41 AM
Hi @WazzaJC
In ServiceNow, you can't directly enter line breaks within a 'String' field in a Decision Table because the 'String' field doesn't support line breaks. However, you can use a workaround to achieve this:
1. Create a new 'HTML' field in the table where you want to use line breaks.
2. Use this 'HTML' field in your Decision Table instead of the 'String' field.
3. When you want to enter a line break, use the HTML tag.
Here is an example:
- Let's say you have a Decision Table for 'Incident' table and you want to use line breaks in the 'Description' field.
- First, create a new 'HTML' field in the 'Incident' table. Let's call it 'HTML Description'.
- In your Decision Table, use 'HTML Description' instead of 'Description'.
- When you want to enter a line break, use. For example, if you want to enter "First line
Second line", it will be displayed as:
- First line
- Second line
Please note that this is a workaround and may not be suitable for all use cases. Always test thoroughly before implementing in a production environment.
Regards
Shaqeel
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 06:41 AM
Hi @WazzaJC
In ServiceNow, you can't directly enter line breaks within a 'String' field in a Decision Table because the 'String' field doesn't support line breaks. However, you can use a workaround to achieve this:
1. Create a new 'HTML' field in the table where you want to use line breaks.
2. Use this 'HTML' field in your Decision Table instead of the 'String' field.
3. When you want to enter a line break, use the HTML tag.
Here is an example:
- Let's say you have a Decision Table for 'Incident' table and you want to use line breaks in the 'Description' field.
- First, create a new 'HTML' field in the 'Incident' table. Let's call it 'HTML Description'.
- In your Decision Table, use 'HTML Description' instead of 'Description'.
- When you want to enter a line break, use. For example, if you want to enter "First line
Second line", it will be displayed as:
- First line
- Second line
Please note that this is a workaround and may not be suitable for all use cases. Always test thoroughly before implementing in a production environment.
Regards
Shaqeel
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 08:00 AM
Hi @Shaqeel thanks so much, sounds like a great solution that I would like to try, however in Decision Builder, within a Decision Table, there is no option available to create an HTML field, unless I am missing something?
How do I create an HTML Field in a Decision Table using Decision Builder - I don't know if we can?
Many thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 09:05 AM
Hi @WazzaJC
I think @Shaqeel was referring to the table you are basing your decision table on e.g.: Incident, Change etc.
I was scouring through some posts and came across this as I was facing a somewhat similar situation so I thought to read this. It's not the solution I was looking for but hopefully you were able to get your concerns sorted.
Good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 07:03 AM
I get why you did this, but i feel like this isnt how it should work. We should have the ability to enter line breaks without creating a new field on the table. Maybe SNOW needs an enhancement on this.
But thanks for your work on figuring out there isnt a clean fix.