convert to lower case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2017 07:45 AM
var gr = new GlideRecord('sys_user');
gr.addQuery('first_name.toLowerCase()',another_variable);
gr.addQuery('last_name.toLowerCase()',lastnewname);
gr.query();
if(gr.next())
{
}
here another_variable and lastnewname are in lower case
I want the table fields also to be in lower case is it possible and how to do it

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2017 07:47 AM
Hi Bhagyashree,
No need of using .toLowerCase() as query does not look for case sensitivity unless we give value directly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2017 07:50 AM
column name will always be in lower case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2017 07:58 AM
Hi Bhagyashree,
Try this link below, might help you.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2017 08:23 AM
Bhagyashree Joshi wrote:
gr.addQuery('first_name.toLowerCase()',another_variable);
gr.addQuery('last_name.toLowerCase()',lastnewname);
- as others have said, "first_name" is in lower case anyway, so no need to apply this method
- as you've included the method in the quotes, the addQuery() function will see that all as literal text.
What's the use case behind this? Are you trying to lower-case some text before including it as a search parameter?