GlideEvaluator.evaluateString

Rohit Agarwal
Mega Expert

Hi,

 

What is the functionality of "GlideEvaluator.evaluateString" ?? And how can I use it in script instead of eval()??

 

Thanks,

Rohit

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Rohit Agarwal 

The GlideScopedEvaluator API allows you to evaluate scripts in a GlideRecord field from both scoped and global server scripts.

The GlideScopedEvaluator API evaluates scripts within the script field type. The scope of the record defines the scope of the script.

refer below links for example:

GlideScopedEvaluator()

Eval VS GlideEvaluator.evaluateString

Examples of EVAL scripts used in Discovery patterns

Regards
Ankur

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

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Rohit Agarwal 

The GlideScopedEvaluator API allows you to evaluate scripts in a GlideRecord field from both scoped and global server scripts.

The GlideScopedEvaluator API evaluates scripts within the script field type. The scope of the record defines the scope of the script.

refer below links for example:

GlideScopedEvaluator()

Eval VS GlideEvaluator.evaluateString

Examples of EVAL scripts used in Discovery patterns

Regards
Ankur

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Rohit Agarwal

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

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