NOWCommunity Live Stream - 2020-01-24

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] good morning good afternoon good evening wherever you are and whenever you are welcome to the community live stream my name is Chuck Tomasi from ServiceNow this is January 24th 2020 and I am here to bring you not only the answers in the community but the answers behind the answers the thought process the journey of discovery the look at how things are built and what goes on in the reverse engineering that makes you a better administrator and developer so you can take what you learn here not just the answers but the how that that learning that deep insight that analytical thinking so that's the goal of this show and it's great to see you good morning Carol good to see you we have a lot of people watching live on YouTube that would be this link there you go I do have the buttons at my disposal so it should be easier theoretically but this show never pro never never fails to pose a challenge you can watch live on YouTube I tried to do this at 2:00 p.m. UTC on the days where I'm home and healthy and no other conflict so this is a labor of love as is the community I love the ServiceNow community and the people that we work with in there whether it's local or global or whatever expertise everybody brings something to that party thank you very much and this is just a small small piece of it that I invite you to watch subscribe like click like if you find something helpful or useful helps other people turn on that notification so that you get those notifications much like let's see if it'll work today I heard the alert there they are YouTube and twitch both happening so streams are up people are joining good morning Dhruv good morning joe slaw and mark good to see you hey everybody's having a good time and you can watch that on YouTube let's go on we know about YouTube we know twitch - which is my backup plan if you've got that the community is the place where you want to go if you've got questions about service now that's what's right behind me and that's where we'll be doing most of the show today is out of there so congratulations to the MVPs I'll get to that in just a second thank you very much John thanks mark and it's truly an honor to be among such wonderful wonderful people because without without people asking questions there wouldn't be much of a community right so I'd have well let's just say it out a little more free time if I was doing it that way if you weren't contributing and asking and doing that wonderful interaction that's what our community is all about I have been on line in communities for 35 years it's a long time I started back in the old electronic bulletin board days ran a bulletin board even Co engineered and constructed a bulletin board software so that that building of community is very important to me whether it's a local one like I did 35 years ago or on a global scale like this it's it's something I truly believe in and makes makes the world a better place makes your jobs easier and having a great time good morning Alan and Andre everybody's joining in thank you very much TGIF to everybody that's tous going first put that on your shoes it's hey thank goodness it's Friday all right it's the end of the end of the week haven't checked with Andrew yet I suspect there will be a live coding happy hour later today if you happen to be online and awake for that so the community is where you want to go for that I also encourage you to go over to the developer portal yes it's true Orlando is now available let's see if it comes up it still says upgrade to New York on the banner but I can tell you Orlando is available I got the message yesterday said hey you can upgrade to Orlando and if you go into manage instance if you've got a personal developer instance you see mine's now on Orlando woohoo and one of the actions down here would be upgrade to Orlando that says you're already on Orlando it's funny because shortly after upgrading I got a notice that says your upgrade to New York patch for hot fix one a failed I should hope so just upgraded to Orlando why would I want to go backwards so at least we know the version checking is it's got some sanity in there so free personal developer instance you can now test out Orlando Pradeep has put out a great article of all the changes that have come out in Orlando and I'll be talking about some of those as we go along lots of great content today whether it's flow designer or integration hub or api's or there's so much good content I tend to focus on the show around the platform and developers that's where my expertise is if you're looking for other content in the community similar to this we do have a DevOps podcast we do have open hours for performance analytics and reporting so there are other venues emerging and I'd love to see more of them come out for second ITSM and there's all kinds of help so I am working with the community team to foster those ideas some of it is is budget related so we got a we got to work within the constraints of that but we will work to get that going so personal developer instances free learning plans blog oh speaking of blog over here on the blog on this column ton off the blog now has Orlando is released you can find out information there to andrew posted that and he's got a rundown of lots of great stuff in there as well the mobile administration analytics and reporting just good good stuff let me make that just a wee bit smaller not bigger there we go you can upgrade should say upgrade to Orlando I'm not sure what happened to screenshot here we also have other blog entries for our service tower developer MVPs you know while I'm here let's do a congratulations on that we have two MVPs you probably saw one at the banner of the community we have the community MVPs this program has been running for quite some time only recently did it start including employees so I am honored to be among the MVPs and the award eze are available here congratulations to a lot of these people so much contribution waiting for the images to load Alan and Alec oudy Mike I'm not going to go through and read them all there's some familiar names in here that you've seen for a while Stephen Bell Goran is now an employee for ServiceNow that's what the little green circle the icon means next to it Michael Richie Brian Pradeep Jase some of these are familiar names a lot of new names in here so congratulations to you people for making this I'm going to put the announcement away so I get a little more banner space Michael fry some veterans in here as well thank you thank you lots of comments coming in congratulations to everybody you truly make this a wonderful wonderful community so thank you from the bottom of our hearts bottom of my heart that you are you are out there putting yourself give donating your free time coding your knowledge and expertise to get that going the other one is our developer MVPs we have a new program that's closely aligned with the community MVPs but and some of these people may look familiar but wanted to say these are these are people that are contributing in other ways than just the community there's there's a developer meetups there's a knowledge and creator con there it's just it's a it's a wider variety and we will be looking to these people to help scale out how we send the messaging about the developer program getting people involved so we hope to have a good partnership with these developer MVPs so it says these people write blogs share apps craft videos livestream contribute to social media as there's more than just contributing to the community but again some of these are familiar names Jim Coyne Jace Benson Earl Duke but there's some other ones that we don't really see too much and notice no employees on here as well so I have not part of the developer MVP program so how are they chosen are you inspired maybe you could be a 2021 developer MVP keep your eye out for that there's questions and answers that's in blog on developers now calm you can find that and of course more stuff on the developer site includes the events meetups coming up up Minneapolis and what was it Charleston had one last night or is it somewhere I can't remember now but we had a couple last night this weekend new delhi's coming up Boston next Monday so we've got developer meetups coming up all over the world if you want to be part of that scene go over to meetup.com where you and about twenty one thousand and a half of your closest friends can be part of the developer community all over the world you can see we've got sixty three chapters and growing all the time we have an intern whose job is nothing but managing and organizing and keeping things saying sending out those reimbursement checks thank you so thank you thank you very much for the people who organized that and if there isn't one in your area and you're interested in becoming a ServiceNow developer meetup organizer certainly send us a message and we can look into that and help you get that started to get the content going mark dude you're on both lists that's so awesome so congratulations to everybody on that the what comes after meetup - anybody remember the events I just have to push the button you can find more events like Snuggs and special interest groups and webinars all that kind of information over at ServiceNow comm slash events HTML one of which is of course knowledge coming up May third through seventh I believe the early bird pricing is still in effect don't quote me on that but go to knowledge that's service now.com and find out you could save yourself a couple hundred dollars it is only who's got the count it is only let's see that's my mom's birthday we don't need that knowledge is only 99 days away and some odd hours I don't put the hours on there so 99 days it's time for my brain to start going into panic mode I have to write I have to write some content today it's actually going to be part of the Builder track the application we're going to and uses the core of that kind of like a cookie show I've got to get my volunteers together next week to say hey here's what we're going to build and here's what we're building upon to give you an idea like I'll show you the finished product sort of except they're going to build out and build on that so a lot of no code capabilities the Builder track is coming back if you've got people in your organization that are no code persona is those process owners the power users people who know what their process is that just need to build an application kill a spreadsheet and get onto ServiceNow so they have a system of record and a system of workflow that they can drive that process bring them to knowledge get them in the Builder track get them hands on experience and they will go oh wow didn't realize it was that easy to get off a spreadsheet and get onto a real system and build this thing out like I said I was doing this Tuesday Wednesday with one of our marketing and campaign people and the budget and finance lady we were building that application we're gonna go through today I imported some sample data for her so we've got 126 records to play with but she's gonna look at this and go wow how can you make it do this you know that's coming there's there's gonna be UI policies galore in this thing hey no Pio was requested then why do we have a Pio field mmm-hmm let's hide that thing so we'll do things like that all right put that away we are going to move on to where were we going after knowledge comes webinars that's right we've got another webinar coming up on the 18th Tech now Tuesday learn all about studio this is our built-in IDE so if you're new to ServiceNow you may want to take a stop off here learn some things if you're new if you've been around ServiceNow for a while well there may be some tricks you just might learn there's there's little things that I don't know about you but I'm one of these people that tend to use an application and use it the same way fairly often until someone points out a new menu option that happened this week somebody was showing me something on ScreenFlow which I use for doing screen captures and video editing in one and they said hey what about that icon except I have been using this application for 10 years and I have never seen that icon and it's been there for quite a while and it's coming in very handy so you may learn something new okay can teach an old dog new tricks I'm evidence of that any script we write today and there may be some I highly anticipate there will be some will be stored off on github in this repository from the bitly link bitly /sn - TLS that service now community live stream you can find it there in a dated folder it would be 20 2001 to 4 with some dashes in there so this is the 24th of January I don't know what I said at the beginning but I'm trying to get into the groove of what year month and day it is it's hard sometimes it's hard ok let's go I think that's it well you guys know about the no code apps for dummies right been out there for a while go to the bitly link download a free PDF ebook and share that with your no code personas in your organization and if you are little more we want to back up to scripting and you want to get started on that I've got a video series for that as well 20:19 was busy let's see what 20/20 brings on so let's move on to the community now that we've gone through all that fun and games actually before I do that I want to do a couple more things I did congratulate our 2020 community MVPs we did our developer MVPs and as I mentioned Orlando is now available we have a blog article out on that I don't know if I mentioned this or not I said Pradeep has an article I'll show you that link in just a minute all of these links will be available in the notes on the video I post very very shortly after I get done with this video so within 30 minutes of this video being conducted and I say bye everybody at 8 a.m. Mountain Standard Time by 8:30 I've got the notes processed the YouTube video up the community posted the links for everything we talked about so you can find all this quite easily on the community about the community that kind of thing so the link for this one is in developer dot ServiceNow com go to the blog articles and you will see over on the right excuse me the left says Orlando now available for developer instances personal developer instance excuse me this is part of our early access program we've got a for C ICD capabilities woohoo we've got some studio enhancements we've got 80 outflow designer integration hub agent workspace CMDB we've got mobile capabilities that come in we can now do branding we can now do photo search we can now do mobile application management virtual agent has some new stuff in it and LU we can clone models and compare and clone entities and clone the whole model it's pretty cool stuff if you are part of the developer program you should have received or will receive today a newsletter ok you only get this if you're part of the developer program it will have a link to a special techniques Tuesday that's why I haven't seen it been coming up on this show because it's for the developers part of the developer program you get this extra special content because developers have early access if you don't have early access then I can't share this with you until general availability which is in March and then I'll open up the same video to the public so tech now Tuesday next week is for the developers only so watch for that newsletter if you haven't already seen it check your junk check your spam folder there's a link in there for tech now Tuesday on the 28th of January where we will go through a lot of this information together then in February we'll do studio in March we're planning on doing the novel platform CI CD stuff and then April is going to be too close to knowledge to actually pull together some decent content May will be at knowledge and then June we're coming back with some more tech now so I'm gonna blink twice and we'll be preparing for Paris that's pretty much it we just seem to hop from thing to thing to thing it's gonna be Orlando then knowledge then Paris then now at work and it's just and there's even some things in there that I'm not even involved with the it's crazy town around here to give you an idea of why we're so busy and well I have so much fun doing this instead all right one article that I do want to follow up on and that is somebody asking how do you restrict the IT role they said if I purchased 100 licenses for ITSM I want to make sure that I don't overdo that this was down in a comment on an older conversation so let me show all the replies and I was going to write a little script to help out with this my suggestion let's see it was a short one good let me see if I can find it sadly group by row lines here reference there's a recent one reason two three hours ago hi all can any one guide me how to restrict no more I told rules to be granted to users of this count cross a certain values now my first question is I'm not an expert on subscription management but I thought there was a table that said here's how much you bought of this and not being a real instance as the personal developer instance doesn't have any subscription management entries in here but and they display only purchased allocated this should do this for you so I want to put in two parts one check your subscription management that will tell you and you could put a business rule against that I don't know that I would necessarily prevent someone from meeting I tell access because it could preclude you from getting some real work done but a warning wouldn't be bad if you had purchased I wish I had some real entry in here maybe somebody can give me some sample data what records I'm looking for you've probably purchased ITSM one of those fields and values look like I can't really force an entry in here because I can't do a new because that's all managed icon the backyard when we when you purchase something it gets into your instance automatically and then when you allocate it it does it that way so this is hard to say without some actual real data but what I could do is get the fields out of configured dictionary or configure table mm-hmm let's do configure dictionary tables called license details and let's sort it by column name allocated and it's probably another one called purchase yes no no interesting what was that field called this is probably just the your table count tables used table count allocated auto sync category count probably just count I'm taking a wild guess on this so if you know how many you counted in fact let's check the label on this in the production is since there is a checkbox to not allow issuing more licenses than purchased tada alright John has this one I'm going to respond back with that very very good answer whoops I've got to find the post simple there it is subscription management has a feature to not allow you to I'm also gonna look in the doc site nothing no trust you but I want to give a reference to this that says subscription management and who my first Orlando link that I get to put in here the ServiceNow subscription management application review and manage how you subscriptions are used to the production is the subscriptions are downloaded to production instances only and not to development and QA instances so let's copy that link out give a reference another option would be to write a business rule on sis user has role and compare it against that number oh pardon me I got the hiccups now you allocate more than you have purchased for the given entry I like like ITSM let's put that like in another option would be to write a business rule insists user has role role when a record is inserted you could you can compare it compare it against the count field I know it was a table license something-something license details the license details Oh a plural table they get one of these from me I do not like tables with plural names on them although in this case details is about the record so I'm letting this one slide don't make plural tables you don't want to sad trombone table to do a glide aggregate of a certain role against like idea they wanted ITIL specifically against the count field and produce a warning message if you exceed it that would not I'm gonna leave it alone leave it alone let's say oh can you help me write that script the answer is yes yes I can but I'm not gonna do it right now so we'll see if they come back with a request that's a follow-up thank you John for that information let's go back to the community we'll do a couple more articles and then I've got a topic that I wanted to get into you probably saw it on my notes let's get into the unrep lied how to remove campaign targets from campaign do we have campaigns in here this campaign part of we are working on campaigns with for roles for example a b c and d role a will have visibility to widget XYZ where i'll be will have P Q and R when we have a campaign for role a and publishing schedule job can content automation add users to campaigns will run and add users to a campaign however if a user from role a is given a new role this will not remove the user from campaign unless it is finished or cancelled what's the requirement here I'm seeing a problem I'm not seeing a solution when we add when we have a campaign with role and publisher at scheduled job will run in the years ago however if role a is given the new role this will not remove the user from campaign unless it's finished or cancelled okay so what's the problem what is the desired goal do you want campaign a and B mutually exclusive so adding to a removes from B and adding to be removes from a let's get some clarification on that I don't know that that's necessarily a good idea but questions count I responded type-ahead on task numbers I'm configuring type-ahead templates and search sources and my requirement is to have type-ahead on task numbers AG Inc there's their zero by searching only words I think that should be words not works with the exact task number is there a way to enable type-ahead to populate when entering a partial number type it out - numbers date or reference field this is our reference field because I said search sources and something else type ahead templates and search sources I don't know a whole lot about typing in templates type-ahead templates the number is going to be create an advanced type ahead template let's go learn something new today complete the required fields in defined search source in the type-ahead tab for the search source record select advanced type ahead config checkbox in the type-ahead template field add the add an HTML template the example uses angularjs bindings of display service catalog items in the type of head results which is wickedly horribly formatted maybe it's because of font size nope just wickedly ugly formatted okay click update type-ahead displayed behind ah that gets you Apple so it's giving you the display value what do they want is there a way to enable type-ahead to populate when entering a partial number looks Ike from the docs that this will work box because the example given for catalog items is using the display value the display value for tasks is the number field by default have you given it a try I'm going to quote that now that I know what the context is it kind of makes sense there didn't say it's not working just says is there a way to do it all right public service download zip files the rest api from external source database embed aterna form we had embedded charts already available trying to embed a chart in a form that shows a number of child tasks associated with a record in a pie chart managed to create the chart but it is it possible to put a condition on the chart in the form to only look at child has where the current record is present is it possible to put a condition on the chart in the form to only look at child tasks where the current record is parent that's a good question that's a great question let's look at embedded charts embedded charts or are they called form charts I can't remember stall SLA breakdown important reports with jelly navel embedded - embedded reports in jelly and following boat of jelly code ooh really I thought you could just put them in there to find out what this page says enabling embedding G and light have report includes XML embedding assistant reports you can then embed your reports so your jelly code to look like this and I suspect you have to have a formatter in there as well you can embed the JavaScript in the jelly code target span report generate an embedded report so if the report it's getting a society how do you pass the parent record to that report mmm doesn't look like you pass any parameter the jQuery element to the event er to the chart user the size the element this is ID of the report you want to embed are you using this method let's find out let's get a link find out are you using this method to embed a chart in the form it's that so I don't see a way to pass any arguments ng current dot society to the report act as a filter you know if you are doing a different way are using a different way all right boom Shane asked I thought jelly was going away jelly is not going away we're just not gonna use it as much anymore there's a a strategic direction to move the interface the desktop interface away from jelly but it's still going to be there you can always use the classic interface that's what you see when you look at this right here these are jelly forms and templates and lists are made out of jelly UI macros so anything you've built will continue to work we're just aware that it is a legacy technology it's getting very very old skill set is getting harder to find on that and it's not the way that the UI is going to look in the future so stay tuned for details on that let's do a refresh and better list collector for portal anybody made one creating a record producer for my end users in portal however there is a field where users need to select a lot of values like the CMDB I'm using the list collector for now but it's not very convenient for selecting like 30 objects works perfectly outside the portal but in Portal it's simply a text field with autocomplete ooh how can I achieve that my goal is having something like a real list collector from the backend and using it in the portal my first inclination is to look at share let's look at share see if there's anything in here or at all it could be called list collector it could hierarchical Department picker to use as catalog variable macro about portal slush bucket know about this collector of a widget I hold apartment if you need your you if you need to your users to select gonna have to work on that one one or more departments in a catalog item and you'll want to present it to them in a hierarchical list then this is the widget for you know let's look at service portal widgets specifically see if there's anything in there get rid of the filter service portal widgets virtual agent service portal widget with side nav extension how many records do we have sometimes fun to look through and see what's out here sent you to drag-and-drop attachments multi button widget with header Jesus the auto box a link button widget with a base expands and you can have up to 12 buttons back to top functionality espy bookmark record report widget redirect page tab widget SP task context guided tour overlay nope it's only showing like five at a time this is annoying system stead ass drag-and-drop attachments Change Password TOS weather widget hmm weather widget I don't play with that parallax service portal widget to data transformations approval record approve a comment clone widget comparison something I wonder if there's one out of the box that were just missing we just haven't seen yet gotta get past all my Community Links here let's go widget sir portal widgets see if there is something in here that has a name evolving list say unless as simple as publication list HRM session list list o knowledge list template this key GG th are empty tasks mm an ordered list respond not seeing anything how about slush slush bucket look at that easy slush bucket widget its rec of using global no no no no okay here's a slush bucket reach it reach it on a box have you looked into using that I wonder if our Doc's have that that's not the docs slowly losing track of where I'm going with the doc with these tabs I can only handle about seven or eight tabs at a time slush bucket widget maybe maybe [Music] no lit buckets but good assignment modified buckets that's referring to performance analytics that should have a question mark on it there's that one what else what else what else having a lot of fun having a lot of fun let's go to unrep light again see if there's something new that's coming 11 minutes ago multiple catalog UI policies on same field ooh ooh good luck I've created a record producer that will allow users to enter up to six entries at the start of the forum I ask how many entries they would like and make and then have multiple catalog UI scripts based on the value of their response just for testing purposes I have created two UI policies so far and it's not working as required behavior I'm seeing is that if I select one as an option variables for two and three are hidden that's expected however I select two all three sets of variables are being displayed unexpectedly so effectively it looks like the second UI policy isn't being triggered yeah this might be a case where you want to get into maybe a better case where a client script that handles all cases you have policies do have an order field so you can run one over the other and you should also look at building your condition condition in the UI policy based on the field value ng UI policy one condition if there count is 1 then run just this one by policy to condition count is 2 to Schofield one only count is 2 then Schofield's 1 and 2 and so on and it really explaining what they've tried so taking a stab and saying here's what I would do haven't done a lot of code yet I want to write something okay download zip files let's take a look at what was my idea for later table utils we're gonna write something came up just before the holiday break if you took a holiday break and they said look I'm getting a list of all the tables and I want to find out how many classes have what number of Records in them but I want to get rid of the ones with the zeros okay or it's actually leaving out the zeros so they gave me a script and I said okay you're doing a glide aggregate this is what they were trying to take this over to my personal developer instance that's not it this is it and let's go to global sir grips background and try this glide aggregate is much like black record you give it a table and it says I want to count I want to do min max average whatever those built-in database functions are to get some values out of the database not the metadata itself but the data about the metadata they are doing a count let me make that a little bigger for you in fact let's do this in vs code then this will be easier to do I have not yet installed the ServiceNow extension on this don't ask me why I just don't visit this machine except for this point in my day create a new script paste that in and it says go get me a glider aggregate on the CMDB CI table and then I want to count but I'm going to order by the count and group by sis class name which is the class so they're going through the hierarchy and let's see what they get and yets AIX has 1 1 1 1 1 1 1 but there's no zeros in here it's only counting where it has a number I said hmm there's no if statement in here that's odd so I came up with a solution for them that said no that's not it here we go I said that's because glider you get is only counting records it'd be a bit like saying see all these houses in this city count the number and group them by color if there are no polka dot houses you won't get a count because there's nothing to physically count it's not like saying it's one of the categories I want but it's not one of the categories you're telling me about what you need is a list of all classes then say how many records does each class have sort of like what color houses you specify when you're counting I suggested using table utils but then ran into something very interesting first of all table utils is global only W tells us a built in out-of-the-box script include that system definition script includes and it's got some handy stuff in it it goes table utils you haven't used this before take a look at it it's got functions too probably wouldn't use drop to what it does a drop not a good idea find out if a table exists is if the valid field you can so my favorites are the ones that have to do with the hierarchy so lots and lots of functions in here take a look see what might be useful to you more tools for your toolbox there are get tables return an array of table names in the table parent hierarchy it returns an ArrayList get table extensions returns an array of table extensions I think that's the one that I suggest you get all extensions which includes the base table get absolute base so if you've got a table and you say hey what's the parent of this what's the base of se task for example it'll say task it doesn't matter how deep into that thing you are and we'll find that so other things but here's the kicker this is the part that confused me at first where my article go here it is I suggested using get table extensions and when I went to my personal developer instance which is around here somewhere and I said gee s dot info list I said print that out oh look it's an array should be easy enough to use right some of you may have done this and know where I'm going with this I said what is list dot length how many tables are in there I got a list of tables that said undefined no way what it's an array look closely at this array look very closely there's a space after the comma why is that significant because if you were to do a normal array in JavaScript bar a1 equals a truck Steve Larry Deepak okay just put some things into an array and then say GS info a1 no spaces not even a bracket mmm there's something different about this array then it dawned on me this is a Java array there are still some of the out-of-the-box functions like table utils I think array utils is one of them also that have that are returning Java objects not JavaScript objects Java objects this was not covered in my JavaScript series for good reason but I want you to use them but if you should run into one of these there is a function let's do this there is a function called J - J yes I believe it is J - J s list okay so let's do that then GS info a1 if it's not right I'm going to go look it up and now look no brackets no spaces this is a JavaScript array it converts the Java object to a JavaScript object very nice very useful now I can do a for loop over that thing and the answer that I gave in here isn't quite right because I had to do a response and said this list dot length isn't going to work okay so that's where I came back you could also do a to array so J 2 J s or to array is another one I think I'd like to erase a little more readable and I said this is where I discovered what's going on then you could put this in a list now put your glide aggregate inside of the loop not outside because what they did is tried it out side the loop I think it was no okay and you will get code that looks like this I'm going to put this in here then I'm going to put it in here nope that one okay going through this together get a new table utils object get all the table extensions from that converted to a java script array I print out the length just to say it's a decent length not undefined then I go through each element with a for loop do a glide aggregate over that table name in that entry to get the count and say how many records are in this table it's a very simple common glide aggregate operation how many records are in this table that's what glide aggregate is for if you try doing this with a glide record and used get row count you would be killing yourself on performance yet row count is not scalable say it again glut get glide record get row count is not scalable you may say but chuck it works fine it's fast it's great for five records if I'm counting the records in my CMDB with get row count and I have say four million see is your gonna be there a while it has to retrieve all of the records it literally says how many records are in this table and then goes through one two three four five six seven eight and counts them in memory hey that's what glide aggregate a glide record does it retrieves records glide aggregate on the other hand uses the built-in database functions if you're familiar with sequel it would do a select count star from table name if you want an account of those records I did a time of this probably eight years ago and said how long does it take to count two million records with get real count and it said four seconds how long does it take to count two million records with glide aggregate it said about three milliseconds double the number of records get row count doubled the time glad aggregate did not so glide aggregate is much more scalable the only reason to you is get row count for a situation like this is if you're going to be manipulating the records anyway if you need to update them if you need to see some value in that record then glide record is going to be but be aware if you've got a lot of Records it's going to take a lot of time glide aggregate is faster for just counting let's run it and it says in my paltry little database I have 705 tables woohoo yes the data the CMDB database has a lot but it's also showing me all the tables and because it's counting the records in each specific table it says here's the deal now you've got zeros in a lot of these but check out oh I think it's CMDB a CI server spell it right there's CMDB CI server it has 40 entries if I go to cm to be CI server notice that it's not only counting its own records but it's counting the child records too because in this table make this little wider so you can see it I have the class and if I say show matching on server there are only 19 that are technically in server the rest are in like Linux server UNIX server so that's a caveat of using this method there's no way that I know that says hey glide record only count the ones that are in this specific class maybe somebody's got a craftier solution so that was the caveat I gave them with that they said that's fine at least I know I answered their question that there were no records in some of those other tables okay so that was a follow up that I wanted to do from that post a couple of weeks ago let's go back to the community see if there's anything in the Inbox aside from congratulations to the MVPs which have been coming in all day we have better list collector portal from Cesare and I said have you tried this I said yeah it could work with a custom filter text I'll look into that thanks for the reply helpful let me know it's find multiple catalog UI policies in the same field I have created a record producer that that's what this show is all about I didn't know if there was a list collector portal but if you do a little digging around you might be able to find one created a record producer here's the record producer where they wanted to pick multiple things at the UI policy and says John replied to this but I don't see Oh No it says Daniel posted this is that quirk of the community that's going on right now where you find out somebody posted something you already reply to yeah we already did that real quick we got a few more minutes want to find out what's happening Wow a jelly question that was asked and answered very quickly how did I not see this I want to read into it we had some Jellicoe to you I macro UI for mothers allowing for users to click it twice before the forum is reloaded I can think of several potential ideas except solution was your best would be to run would be a counter or some other setter combined with the check in your function so here's the button on click here's the JavaScript function counters one otherwise increment the counter interesting several potential areas additional info problem is I'm trying to solve is that when the button is clicked notification is sent and form reloads but users have clicked the button twice sending duplicate notifications fun you gotta love customizations don't you logging raw rest data in script duress API inbound I do this all the time scripted REST API czar fun they give you total control over the inputs and the outputs and the way it's processed I'm an inbound scripted REST API and developed an integration with another system the system will be sending transactional data to ServiceNow periodically the issue I'm having is I want to capture the raw JSON from the rest message and they've got body is request body T date is the transaction date out of body data and they're trying to do body data string but if that's an object we want is a json stringify josh nereus who is one of our employees responded to this and said json.parse request string so request string is the body data string that body data string wait a minute he understood it apparently the request stream can only be read once dot walking in to request a body dot data implicitly reads the body and parses it an object when you subsequently try to access the string it's no longer available and vice-versa if you go for the data string first try something like this oh okay I got you when in doubt I usually do a json dot stringify and dump things out so he's got transaction then gets the transaction date then gets request string which is the whole string oh ok so comes as a string and like you said it's implicitly parsed into an object once it's read that doesn't seem right I I would rather say you know what all responses and requests are strings you deal with it but we're saving you from doing an occasional parse and stringify good to note I find that helpful as well all right I am coming up on the top of the hour let's see if we can sneak one more in here what could be the reason if chief forms set display is not working but setvisible is working so there's a difference as you're probably aware I'm going to go to the glide form good question to end on rather than digging up a new conversation glide form has different methods this is how the client scripts interact with the form there are two very very similar functions one is called set display which displays or hides a field this method can hide Rand Ettore field with no value if the field is hidden in the space is used to display other items whenever possible user UI policies so this method that's a good point so set display says I've got four fields lined up and if the client script hides this one the other two move up and now you see three fields set visible is slightly different it says displays it hides the field on the desktop UI the space is left blank when hidden so one two three four if you hide number two then you see one blank three four on mobile or service portal UI the space is filled by my other items this method cannot hide mandatory fields with no value okay so and I think set displays the same way it goes hey wait a minute this mandatory you can't hide something mandatory that's very cruel and unusual you can't make mandatory fields read-only either so check that out that's the the main difference what could be the reason if set display is not working but visible is working I don't know that there's technically any difference to those check your console log see if there's something going on there so turn on the browser's console log in Chrome that would be viewed developer developer tools and you get a handy dandy little log over on the side that will tell you if something is blowing up in your face I use this all the time with service portal very very handy take a look at that that may shed a little light on on client script issues so with that I know that wasn't an official post but I'm gonna forget if I don't put a note in there let's do set visible versus set display there gotta remember it so I can get it in later I want to make sure that we remember what we talked about and on that note I am going to that was fun need a sound effect for that thank you all for joining me I hope you had a wonderful week hope you have a great weekend and congratulations once again to our community MVPs and our developer MVPs on such hard work and we look forward to look at seeing you at knowledge all right with that I wish you all the best and have a great weekend take care bye everybody [Music]
Info
Channel: ServiceNow - Now Community
Views: 1,191
Rating: 5 out of 5
Keywords:
Id: 1Y7VxqW13u0
Channel Id: undefined
Length: 59min 51sec (3591 seconds)
Published: Fri Jan 24 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.