Notification toString() problem

avinashdubey103
Tera Guru

Hi , I have a requirement to print the u_questionaire field of request item in a notifcation 

I have wrtitten a email script in that iam using this 

 

I am using this script :

var u_questionnaire_value = current.u_questionnaire.toString();
 
but the output is not formatted:
avinashdubey103_0-1703594462042.png

 

1 ACCEPTED SOLUTION

@avinashdubey103  can you please share screenshot of your record that is storing this value on form?

Is it storing data on separate lines in Questionnaire field?

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

11 REPLIES 11

it is printing the same way , not on the next line 

@avinashdubey103  can you please share screenshot of your record that is storing this value on form?

Is it storing data on separate lines in Questionnaire field?

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

thanks for the help , the requirement is kept on hold now 

Pavankumar_1
Mega Patron

Hi @avinashdubey103 ,

what is the field type of the variable?

try like below script

var u_questionnaire_value =current.variables.u_questionnaire.toString();

 

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

string