How to fetch list of records from database table with a query string containing special charachters and spaces?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2014 12:07 PM
i have a data base field named as "short_description" in a table customer . I want to fetch list of records from the table with a query string like this;
var gr = new GlideRecord('customer');
gr.addQuery('short_description','abc , cfg rth_as@abc.com');
gr.query();
while(gr.next())
{
/* some actions performed */
}
-------------------------------------------------
the query does not fetch any records from the table customer............... is there any other way to query with that particular string value to fetch data with exact matches?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2014 04:20 AM
Something else you could try is to do a Show Matching in the list the record is sitting in, then pull the query for that match:
From there, put it into your script as an Encoded Query.
I've had better luck that way occasionally.