thisnameissoclever / servicenow-efficientgliderecord Goto Github PK
View Code? Open in Web Editor NEWhttps://egr.snc.guru
Home Page: https://egr.snc.guru
License: Other
https://egr.snc.guru
Home Page: https://egr.snc.guru
License: Other
When I just need to check the existence of a record with hasNext()
I don't really need any fields returned. Without adding any field, superfluously, I will get an error that "No fields were specified to retrieve."
When there's no .addField()
specified, assume that the sys_id
should be returned. I believe this is how GlideQuery works.
First of all - thanks for this library, landed here by chance after googling for something else, but certainly appreciating it a lot!
I wonder if I'm missing something, but doing orderBy("fieldName")
seems to use alphabetical search by default, I could not find a way to sort numerically without pushing to an array and sorting myself, which is no biggy, but maybe there is a better way to be doing this...
In the example below, the u_priority
field is an integer, The same happens when using the order field
// default order by is alphabetical, no good on numbers! (e.g they come out as 1,10,11,2,3,30,4,5 etc)
// Create an array, add the eGR values to it as objects, and then sort it numerically.
var priorities = [];
while (eGR.next()) {
priorities.push({
val: eGR.getValue("u_priority"),
label: eGR.getDisplayValue("u_priority"),
});
}
priorities.sort(function (a, b) {
return a.val - b.val;
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.