Example: If you have a check box variable. Question(Label) - Adobe Photoshop Name(Backend value) - photoshop Email Script:- var getPhotoshop = current.variables.photoshop.getDisplayValue(); //Checkbox will return true/false(Boolean). if(getPhotoshop){ template.print('Adobe Photoshop is Selected'); }
@Srinivasa rao Example:- In Gender(u_gender), Male(male) and Female(female) choices are there. If user selected Male in Gender field. You will get like. Var selectedByUser = current.variables.u_gender; You will get selectedByUser = male.
@@AMServiceNowDeveloper I need a another help which is out of email script. The requirement is how to change a date format for particular date feild in a form.
I think that works from the notification as well - just typing ${variables.u_state} or ${variables.u_requester_name} would bring back the result (even though it's not in the field picker).
Just what I need, straight to the point. Thanks
Thanks 😊
Thank you. This was a perfect lesson.
your videos are Awesome!! I learn a lot with you!
Thanks 😊
A big thanku man.....
Thank u very muchhhh...
You made this so easy....
Thanks :)
Can you do this from other tables? like use sysapprover Table but fields from RITM?
Can i do the same thing on Approval table?
Can I know how to get the value for the check box variable by using email script
Example:
If you have a check box variable.
Question(Label) - Adobe Photoshop
Name(Backend value) - photoshop
Email Script:-
var getPhotoshop = current.variables.photoshop.getDisplayValue();
//Checkbox will return true/false(Boolean).
if(getPhotoshop){
template.print('Adobe Photoshop is Selected');
}
@@AMServiceNowDeveloper What if I had a choice feild for that how can I call a variable by using the email scripts.
@Srinivasa rao
Example:-
In Gender(u_gender), Male(male) and Female(female) choices are there.
If user selected Male in Gender field.
You will get like.
Var selectedByUser = current.variables.u_gender;
You will get selectedByUser = male.
@@AMServiceNowDeveloper thank you helped a lot
@@AMServiceNowDeveloper I need a another help which is out of email script.
The requirement is how to change a date format for particular date feild in a form.
It works! Thanks
You're welcome 😊
I think that works from the notification as well - just typing ${variables.u_state} or ${variables.u_requester_name} would bring back the result (even though it's not in the field picker).
You could just have done ${variables.u_requester_name} directly in the email notification