How should i add space in the mailscript

Naresh291
Tera Contributor

Hi ,

how to add the space in the following script line in the notification mail script :

template.print(' The request to add/remove access for '+current.variables.requested_for.first_name+' has been processed.');

In the above script , i want to add the space in the beginning of the sentence i.e. before "The".

Any leads is highly appreciated.

20 REPLIES 20

Voona Rohila
Kilo Patron
Kilo Patron

Hi Naresh

 

try

template.print('<p>&nbsp; The request to add/remove access for '+current.variables.requested_for.first_name+' has been processed.</p>');

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Ankur Bawiskar
Tera Patron
Tera Patron

@Naresh29 

is the space not coming since you already gave some space before The

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Naresh29 

If it is not working fine then you can try approach mentioned by Aman

or you can also try to use OOB template.space()

Mail script API

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Its not working ,

Can you elaborate how exactlty do i need to add in the template.space()