- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2017 07:51 AM
Hi,
I have a function that iteratively create string commands like ad.u_namefiled1='string1'; to be evaluated by eval .
These instructions refers to a glide record variable ad = new GlideRecord('u_my_table');
I know eval should not be used but replaced by GlideEvaluator.evaluateString .
The problem is that eval is working but GlideEvaluator.evaluateString! I tried to find more detailed documentation about the use of GlideEvaluator.evaluateString but I couldn't find anything useful.
Solved! Go to Solution.
- Labels:
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2017 08:45 AM
Hi,
I understood the problem reading the thread: https://community.servicenow.com/thread/160402
Many Thanks,
Luca
Da: ctomasi
Inviato: lunedì 2 ottobre 2017 17:16
A: Luca Solda
Oggetto: Re: - Eval VS GlideEvaluator.evaluateString
<https://community.servicenow.com/?et=watches.email.thread>
Eval VS GlideEvaluator.evaluateString
reply from Chuck Tomasi <https://community.servicenow.com/people/ctomasi?et=watches.email.thread> in NOW Platform - View the full discussion <https://community.servicenow.com/message/1257083?et=watches.email.thread#1257083>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2017 08:14 AM
Hi Luca,
Can you share the script with us? I've done a lab on using GlideEvaluator.evaluateString().
Also note if this is being used in a global or scoped app.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2017 08:45 AM
Hi,
I understood the problem reading the thread: https://community.servicenow.com/thread/160402
Many Thanks,
Luca
Da: ctomasi
Inviato: lunedì 2 ottobre 2017 17:16
A: Luca Solda
Oggetto: Re: - Eval VS GlideEvaluator.evaluateString
<https://community.servicenow.com/?et=watches.email.thread>
Eval VS GlideEvaluator.evaluateString
reply from Chuck Tomasi <https://community.servicenow.com/people/ctomasi?et=watches.email.thread> in NOW Platform - View the full discussion <https://community.servicenow.com/message/1257083?et=watches.email.thread#1257083>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2017 02:50 AM
Hi Luca,
i would recommend you to please go through: Coding Best Practices - ServiceNow Wiki
Thanks,
Aditya Telidevara
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2017 06:17 AM
Yes. I do understand the issue now I'm using GlideEvaluator.evaluateString.
Many thanks to everybody!