Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Display name based on condition

Chirag Pathak
Tera Contributor

Hi community I have catalog client script running on this record producer when the first variable is Are you logging this incident for someone else (yes/no)? it is no it should show the name of the logged in person but if yes it should its doing that in the backend but not on the portal.

Portal

ChiragPathak_2-1707722102984.png

Backend 

ChiragPathak_3-1707722152034.png

Catalog client script (Onchange client script)

ChiragPathak_4-1707722226531.png

 

 

 

8 REPLIES 8

Not applicable

HI @Chirag Pathak 

 Change g_user.getUserID();  to  g_user.userID(); 

please try it and let me know.

Thanks for the response,
I have tried that and the result was when I select no in that variable again it does not populate the name again 

 

Not applicable

Hi @Chirag Pathak 

Check whether UI Type is set to All . 

SarikaSNair1_0-1707724938552.png

 

yes I have the screenshot on top and the UI type can be seen there it is set to all