Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glide Record Encoded Query #171

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions GlideRecord/Encoded Query/Glide Record Encoded Query.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var grInc = new GlideRecord('incident');
var strQuery = 'active=true';
strQuery = strQuery + '^category=software';
strQuery = strQuery + '^ORcategory=hardware';
grInc.addEncodedQuery(strQuery);
grInc.query();
while(grInc.next()){
gs.print(grInc.number);
}
11 changes: 11 additions & 0 deletions GlideRecord/Encoded Query/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**Create a GlideRecord Object:**
var grInc = new GlideRecord('incident');

**Initialize the Encoded Query String:**
var strQuery = 'active=true^category=software^ORcategory=hardware';

**Add the Encoded Query to the GlideRecord:**
grInc.addEncodedQuery(strQuery);

**Execute the Query:**
grInc.query();
Loading