Trimming the short description (Removing last line) to print the value in notification

Ganesh Manasali
Tera Contributor

Hi All,

 

I have a requirement to print the value of the description in the notification body by removing the last line of the description 

if description having below value

111

222

333

444

 

I want to print the below value in notification

111

222

333

 

Can anyone suggest me how we can trim the value to achieve the above requirement in mail script?
Thanks in advance

Regards,

Ganesh

1 ACCEPTED SOLUTION

Aman Kumar S
Kilo Patron

Hi @Ganesh Manasali 

You can use below code in email script:

 

var desc = g_form.getValue("description");
var arr = desc.split('\n');
arr.pop()
alert(arr);

Best Regards
Aman Kumar

View solution in original post

1 REPLY 1

Aman Kumar S
Kilo Patron

Hi @Ganesh Manasali 

You can use below code in email script:

 

var desc = g_form.getValue("description");
var arr = desc.split('\n');
arr.pop()
alert(arr);

Best Regards
Aman Kumar