- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2017 11:31 PM
Hi,
I want to write encoded query for 'GOTOnameLIKEfolder^ORshort_descriptionSTARTSWITHfolder 'The problem the 'folder' is dynamic.It
obtained from the user.The code we are using is mentioned below.I want to add sc.addEncodedQuery('GOTOshort_descriptionSTARTSWITH'+data.q)
in or condition to the existing sc.addEncodedQuery('GOTOnameLIKE'+data.q); query.
data.q = input.q;
sc.addEncodedQuery('GOTOnameLIKE'+data.q);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2017 11:36 PM
Try using this.
var query = "GOTOnameLIKE"+data.q+"^ORshort_descriptionSTARTSWITH"+data.q;
sc.addEncodedQuery(query);
sc.query();
Hope this helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2017 11:36 PM
Try using this.
var query = "GOTOnameLIKE"+data.q+"^ORshort_descriptionSTARTSWITH"+data.q;
sc.addEncodedQuery(query);
sc.query();
Hope this helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2017 11:47 PM
can you please try:
sc.addEncodedQuery('GOTOshort_description>=+data.q^GOTOnameLIKE+data.q');
Regards,
Bubuprasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2017 11:51 PM
HI Gomathyshankar Selvakumar
can u pls try this
var gr=new GlideRecord('ur table name here');
gr.addEncodedQuery(short_descriptionSTARTSWITH+data.q^ORGOTOnameLIKE"+data.q);
gr.query();
while(gr.next()){
//Do some action here
}