NOWCommunity Live Stream - 2019-04-01

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 tamasa from ServiceNow and this is the web series that helps you be a more effective ServiceNow developer and administrator by giving you a look at the answers to our community some of the things that I come up with the journey of discovery the thought process the exploration that goes on behind those answers so that you can get a more in-depth answer than just the answer that you get on the community I just realized that I haven't done an introduction in a long time and this may be the first time that some of you are watching the video so thank you for joining thank you for watching thank you for discovering my name is Chuck Tomasi I've been a ServiceNow for coming up on nine years I was a customer for a couple before that and that gives me what about 10 or more years of experience on the platform doing custom applications integrations that's where my specialty lies a platform in general my title is senior TPM M I'm going to leave that to your imagination to figure out what it means it was documented somewhere but I am all about getting people more enabled on the platform to to help them learn discover what's involved and this is a fun way to do it every morning at 6 a.m. my time 1 p.m. UTC you can do with what you what good party Carolyn Ram sport Shayne J we've got a number of people that are joining us live let's get into the pre log Rafi g'day is that is that from Australia Rafi don't know let me know do this on YouTube subscribe to the channel like that if you find something helpful in the next hour so be sure to like the videos that other people know that it's out there and available and you found something useful interesting even mildly entertaining you could do that I post this to the community as well show that link in just a little bit give a shout out where you're from how is the weather that's in YouTube it's always fun participate in the discussion and then we also do this on Twitch be sure to set your notifications so that you get those notifications like let's see if I have this up and running yes there we go twitch and YouTube of both responded on my phone screen you can see that it's live there and then you can join in and have some fun with that as well so maybe we'll be getting back to the mobile interface maybe no I will see I did do a number of things over the weekend that I wanted to share with you that's part of this show some of it is going into the QA for the community and others is hey look what I learned and share that with you so that you can take that to your organization and employ those skills those techniques and like I said be a more effective ServiceNow administrator developer just double checking that I got the mute button this morning sometimes it takes me a couple of minutes and when I don't do this every day I had a number of things that were interfering last week local and remote and that's gonna happen again this week so the the content products will be low but I hope the quality will be up to par good morning Christopher good Maury Deepak Wow we have I feel like I have my arms around the entire globe right now we've got people everywhere from the early morning United States to the late night in Australia that's really cool that's why I picked this time slot the only people I can't reach our sleeping in Hawaii because it's 3 a.m. there right now let's continue on as I said we do this on youtube and twitch so use the links there also do this you know let's go through the little longer pre-roll if you are new to the community if you're new to the ServiceNow community at community dot service no not calm I'll flash that up there to come back in just a sec be sure to actually you know what I didn't flash that up and I will bring it back this is where it's supposed to be yeah community dot service now.com get your questions your issues your problems you put them in there and get the subject matter experts to help you out we have lots and lots of very smart people that can assist join that discussion I am not the only one out there I participate very little these days relatively speaking and make sure that if you want the most impact out of that one question proposed post that question and the right forum lead with your questions problems you what you've tried what you expected code snippets are helpful screenshots are very helpful when when you've got a screenshot obviously you need to be careful of confidentiality with your organization so that you're not posting something that could potentially get you in trouble there's you could always use one of those applications to scratch it out or blur it out or even Microsoft Paint will do that for you you can post that up there that will be very helpful and you get a better chance of getting your question answered not saying that at all every question gets answered but we certainly try the if you've been around for a while I kind of remember my next hotkey I haven't used in a while if you are seeing a pattern to some of these questions some of these articles some of these posts then consider making a blog article consider making a post that encapsulates all of them it could be something like what Pradeep did a couple of years ago on code search like here's a helpful tip I just learned share that type of information that's kind of where this whole idea started of making a video is there were things that I learned and I said I need a better way to share this then just keep cranking up blog articles so I took a video approach to it I don't have to I don't have to write as carefully when I do that now obviously these videos aren't as searchable I tried to include topical links so that people can find them but consider doing that and earn yourself some cred on the community that's a lot of what people like gora and Mike Bell a Steve Bell Michael Frye a lot of these people are writing articles just because that's a great way to build their brand show themselves as a subject matter expert and something to consider it's it's out there the developer community over at developer.samsung.com so you can find that real quick is where you can get yourself a free personal developer is since running Madrid or Londyn I think we're still going back to Kingston you can find free learning plans out there on the developer community under learn right there at the top menu training learning plans documentation we've got API information for server-side client-side REST API s lots of great information as I mentioned free personal developer instance there is a shear portal where you can find code snippets or handy widgets or sometimes full-blown applications such as some that I have written to assist you so take a look at the share portal I don't promote that as much as I should it's it's like the store only this is this is more of the Google marketplace where things aren't certified the store has certified applications and you can find that at store dot ServiceNow com the developer portal has user contributed things a customer and user you don't have to be a certified partner and it's not going to live up to that same level of stringent C for the application so consider looking at share even if it's just for an inspirational thing loaded on your developer portal your free personal developer instance excuse me and try it out there before you load it into your dev instance and get it into pride make sure that it works do a proof of concept that sort of thing and of course lots and lots of events and our prologue blog the blog has articles primarily from Josh Darius Andrew Barnes Dave Slusher they're posting lots of great content out there as well and as we mentioned recently they've added the comment feature on there so be sure to add your commentary your feedback to those articles developer portal very very useful eat whether you're just getting started you're new to the platform you're an experienced developer new to the platform you want to learn more you want to grow from administrator developer that is what our developer program is all about and as I mentioned there are events many of them coming up Helsinki developer meetup on Wednesday this week Chennai also has about coming up wow that is a very short list and I suspect it's because a lot of people are ramping up to getting ready for knowledge so meetups there if you want to find out more if you want to find out if there's one in your area head over and over to meet up chew and get that meat up where's my title for meetups oh yeah a technical issue see if we can get this meet up meet up meet up meet up the portal it's there I'm just I'm still reading his developer portal not developer meetups okay bad eyesight this morning developer meetups over a meet-up calm / pro / ServiceNow dev program is where you can find that we have over 15,000 people worldwide and growing all the time 50 chapters look for one in your area if there isn't one reach out to us we'll help you get what started not going to run it for you will help you organize it provide content to provide funding that sort of thing to get like-minded ServiceNow developers to get together good morning Kobi good to see you I think I said hi to Christopher so good morning to everybody else good day good afternoon wherever you are the meetup portal check it out sign up get it get linked I think I am affiliated with a number of these so I'll get notifications in my inbox that Raleigh is having a meet-up don't know that I can make every single one of them but I can certainly keep tabs on them in case I have a business trip there if you are on a business trip see if it aligns you with one of the chapter meetups or align your business trip to the chapter Meetup how's that for backwards logic what keep going we also have other events that you can find over at ServiceNow comm slash events html4 snugs which are ServiceNow user group meetings we've got other other events coming up I think we've got some that are posted out in the fall in q3 of this year I'd say fault that's a northern hemisphere thing I know it's not fall it's it's currently fall in Australia New Zealand so no offense meant I often slip up and use my local bearings but q3 will go with that I have to do with the time I do the show in UTC and I have to start remembering its q3 when when we have now formed now summit coming around the world hope to be part of that again this year but looking a little closer to check out the events page and see what's coming up in your area there's always something fun the we also have knowledge of course speaking of closer to home knowledge 19 is how many days away as anybody else counting besides me let's bring up the mobile UI again and knowledge 19 is 33 days 17 hours 48 minutes of course I'm counting until Sunday morning you may be counting until Monday night I don't know that's your prerogative but I am with when it gets to that 30 day mark that's when panic mode sets in there's still a lot of work to do there's a lot of work that's been done I am mildly anxious at this point with the workload versus the time left it has never been in this situation before because the workload is higher this year but I am really really looking forward to knowledge this year I'm looking forward to being able to stand back and appreciate what has been done by all the people there are hundreds hundreds of people at ServiceNow and customers tons and tons of customer sessions so the scheduler is up go to knowledge that ServiceNow Kombi can get to the content catalog there and start scheduling your things keep in mind some may move I've been getting my appointments ago yeah there's a couple of conflicts that need to be moved there's a couple things that are out of order like we'll have an intro session on Thursday it should really be out Tuesday so there there may be some scheduled thing but go plan out what you want to do organize your schedule if you're not already signed up for knowledge you go over there and register as well it is still open there's still space to grow it's going to be a wonderful wonderful time it's it's been fun being part of the first time I've been part of the whole prep for the keynotes listening to the content that others are putting together the customer testimonials and their stories that we're running the demos that are going to be created that it really is an interesting insight to have this sort of backstage past this early to some of this content even though it's there's there's so much more I'm not but looking forward to that let's put the mobile screen away before I get back to the main screen so networking don't forget to bring your business cards and sit with people you don't know so with people you've never met before because that's how you're going to grow your network and grow your experience and you'll be able to share with other people what you've learned and they'll be able to share what you've learned and then we say oh really I haven't implemented security operations yet tell me more about that how did you get started where are you now what do you think what are the challenges you ran into those are going to be extremely valuable conversations don't forget my career tip write down who it was on the back of their card and when you met them and what you discussed because when you get home it's all going to be a blur you're going to meet a lot of people some of them at you know the parties Tuesday night Wednesday night Thursday hey go they didn't have a card that's all right do what you can do the best you can come parting shot e good to see you alright enough of knowledge let's do the what else was a customer success center haven't mentioned this in a while customer success Center is at service mountain comps life success lots of great thing don't forget to check out the success navigator to help your organization find out where you are on your path it's a few questions like filling out a survey and it creates a custom PDF with tasks actionable items that you can implement and assign an address in your organization to really get the most value because ServiceNow is a big platform with a lot of applications and we want to make sure that you're implementing your supporting you're maintaining there's like 50 best practices out there on the success center so I encourage you to go take a look ServiceNow comm slash success I don't have the slide for the next technolon the next episode which is likely going to be Friday the what would that be the fifth of this week so April 30th you can find it if you go to the community let's go back to this screen community and the magic link yeah I have it as a bitly link you find it if you go to you know let's bring up vs code wrong keyboard hold on back out so I don't mess up the video I'm going to visual studio I will type it here for you I have a bitly link that will take you to the index page let's make a new document there it is we don't need to release notes thank you HTTP fit - ly service now - tech now some of you may already know that and if I go to servers now - tech now in a new tab it brings me that is a crazy paste sometimes paste doesn't work I don't know what that is that's the copy that doesn't work tell me why that didn't copy edit copy address bar paste okay it's probably easier just to type that again bitly servers now - tech now brings you to the index page of all the episodes that we've been doing since early 2013 you can see we started out with jelly woohoo crazy stuff in 2013 and number 63 which is down here at the bottom of the list is on the features of flow designer and integration hub Ian Madrid so April 30th 8:00 a.m. Pacific usual time we have our X ask the expert session oh look they updated the image I don't know how they did that because I'm using the same URL crazy so Stacey and I will be going through there is a register link here and welcome to do that otherwise it goes back to all the episodes and we are going to be talking about the looping constructs and giving a demonstration the integration hub features that have been added lots of great stuff that's that's happening that is episode 63 of tech now you can find that again through the link bitly slash service now - tech now that is and always will be there ok are we done yet almost because if there's any code to be had to it will be in github at that link so if I read any scripts I'll be sure to publish them so that you can download them take it make it break it do what you want with it and leverage that so it's there for your convenience if you say hey Chuck that was a useful script to find active users and take away their roles when they become inactive you know we've done all kinds of little script key utilities there they're dating back almost a year on the days where we have script so if you go to that link you'll see dated folders and if there's one dated today for April 1st 2019 happy April Fool's I don't have any proof Fool's jokes planned you can find them there all right back to where we were going let's go to the community and find out what's happening so refresh reload and restart we let's look at the unrep lied after when a user generates request item in service catalog how many records creates in the backend please answer kind of depends on what your workflow is doing see if I can understand ajma'in teresting that it's there okay how how many what was it how many records the standard process for the catalog standard process for catalog items fire fingers are off to a great start today aren't they or cattle or we go 125 or 150 150 okay catalog items is to create a record in SC req item and SC request the latter being the parent of the former record of the former any additional records AG tasks are stored in SC tasks and are created based on your workflow so the hierarchy looks something like this hierarchy looks it's not only hard to spell say but it's hard to spell high or okay just keep spelling till the red line goes away I can't spell that word something like this request SC request goes to requested item which is an SC req item which goes to task which is in SC task your mileage may vary publish that bring the BA here we go got one great way to start April right find out what happens all right I have so many topics I want to talk about but I want to get some of these to import attachments during a migration project hello all I would like to know if there was an easy way to import bulk attachments PDF txt doc XLS JPEG PNG etc in a scope application records well we're coming from a third-party application I was initially referring to the below link which is four years old but I'm hoping there is an easy way now any help is greatly appreciated let's find out what the other link did oftentimes they're migrating from an older tool and a service mounts requirement that the file attachments migrated from the tool do the output of this exercise to robust powershell script I am type how did they do this before was it rest or was it JSON well how did they Wow this is the article this is the kind of thing you should write if you have the question or you learn something and when I did something I'm pretty proud of this is going a little bit beyond what I have time to cover in the show I'm interested but unfortunately don't have time to bring myself up to speed on all of that so apologies if that was something you wanted to look at go ahead well updating work notes and servers now some special characters are being sent into the other tools payload please find below JSON code for work notes which is sending special characters to other tool when there's base and next line please guide how I can resolve the issue so function JSON encode the string I don't know if we're using and I don't know that I'd use the class but let's find out how we're doing that sets string parameter work notes JSON a code current work notes journal entry I've tried stringify especially if you've got to do that that reeks of string file then do comments the results are internal work notes it's converting the less-than and greater-than to obviously ampersand LT and ampersand GT this what are the extra characters newline carriage return couple of comments a couple of comments let's try that again a couple of comments to get you started first rather than use new JSON encode try using json stringify something like this let's go get a chunk of their code just have some fun in line example okay so it's string parameter comments to do that let's do a code block with this little symbol right here in the community editor make sure it's JavaScript and I'm not above burning a couple of variables far comment equals will get this kind of help anyway for me to make it a little easier to debug journal entry is gonna return that anyway it's not an object then you can do json dot stringify comment put that in there down below where i can't see we have that second which characters specifically are messing you up I can see that this and that get turned into ampersand LT and ampersand GT respectively because they have to that's just the way were encoding works otherwise otherwise it could infer here interfere with the payload on the other end okay let's get started with that see where we go there's to keep and going SP type head will help didn't work notes where I just did that one let's do a quick refresh there were a couple of things that I saw at the top of the list that I'm that intrigued me but I wanted to take a look at after when did I or did I not they just posted that again okay please only post in one community at one this isn't field service management I haven't answered this what happened to my refresh that was bizarre did I not hit refresh just then okay maybe it was me while updating work notes that's the one I did did they edit this cuz a minute ago that was in field service management now it's in service integration and management very weird add / remove rows functionality catalog item no no no how to add logo in email body now it's been answered and I want to see what the answer is for that I want to add a logo in notification email body below attached is the logo you can add the logo by the following procedure go to notifications edit your notification and under the message click on insert image icon and do that okay I would also recommend they go back and watch last Monday's video so there's our answer let's go find that on YouTube in this feed somewhere there been a lot of videos if you subscribe to the community channel you know that there's a lot of content back here that gets posted I am NOT the only contributor to this channel so copy that link address bring that forward I also suggest you know it even better let's not do that let's go to the community and where are we gonna find this oh you know what we can find it through this link stop the playback it's in the community there's a link in here that brings you back to the community oh you watch it within the community I put that there I also suggest sorry about that screen hopping around just copying and pasting a link you watch the video I did from Monday on air Monday 25 2019 towards the end I talk about email notification templates no it wasn't templates what are they called I can't remember now get back logged into my personal developer instance system policy it is email templates okay and copy paste link new page go there done that these allow you to set up a framework that the [Music] notifications can each notifications can use and that way you don't have to add the logo to fifteen hundred messages at once and when the logo changes too many S's in messages and when the logo changes you only have to update the one template rather then touch each notification I should know because ServiceNow has changed logos three times in the nine years I've been here don't think it won't happen to you all right young companies tend to do that a little more frequently that older companies but it does happen I think as I was growing up Motorola changed their logo Starbucks changed their logo how about that a couple of times so yeah it happens how to decrypt password to encryption in a scoped application good question I thought there was a way is there no method and it would help me decrypt password to two-way encryption filled in a scoped application five replies try this new glide and krypter krypter his current you password decrypted you know these are really they look a lot better if you put them in a code block that's based out that is thank you for reply tried but using glide encrypted works only in global not scoped applications hi after generating a request item I know how many records creates on the back end that's nice but not part of this discussion okay in this part of a different discussion this wasn't this part of a different thread thread please help keep the community organized I'm gonna give a big smiley face on that one there we are wouldn't have known that if I hadn't been reading all these threads so let's go take a look at developer.samsung.com this and look for Oh something in scoped called decrypt and we get decrypt script and scripted string decrypts a clear string using Triple DES so we come up with is this part of here let's try something a little more specific decrypt password - and we get community community community no api's about just looking for password to an API set encrypted output setting cryptid output set encrypted output execute cell flow execute action I don't see it okay intriguing with a capital I missing additional comment for the reply email import attachments avoid duplicate record insert through business rule let's find out what's going on here I have an order item table invoice table and invoice line item table in normal application behavior order items are added first and when the application state has changed to reservation confirmed then the invoice is generated and the order items are added once the invoice item it is trying to grab hold of the data model here invoice line items are recreated on all order item insert update okay so what's the what's the action when the application status has changed to reservation confirm before adding order items it will generate zero amount invoice and I have blocked this issue by checking the or item table row count as below so that go into their table they do an ad query for records that have a reservation of the current ID looking for a parent-child relationship is what I'm looking at see if they get there if the row count is less than or equal zero I don't know if we can be less than zero but okay then they get out and they don't have one otherwise create invoice logic created with logic and if the order items are added the status changed then the invoice should be generated first I have a business rule for this on the order item table to show below and here is a big long business rule that I'm going to try and condense really fast has invoice for the reservation checks and does a query you know rather than doing this you could just do a has next there's a method called has next that just returns a true or false it doesn't even retrieve their record if you need to retrieve it then you do a next and it will fail if it doesn't exist then they go in here they do in initialize they create the record this part doesn't need to have a dot sis ID on the end that is a bad practice you're getting the entire record your dot walking to that record and implicitly retrieving that record just use a society which you already have in a reference field I'm not seeing you to get values in here so use it your own risk we've got we've got some dot walking going on which is fine we've got a new glide date time so they're creating a record there's my insert and another business rule oh my goodness this just goes on doesn't it again I'm not gonna be able to do much here given the amount of information and there's already a thread going on so apologies if that was yours and you're looking forward to it I don't skip over these lightly I want to make sure that this is interesting and there's something to learn here looking for a script that I can use in a flow designer to make a rest call to Google contacts API or to any API using OAuth oh my kind of stuff don't want to use rest step available in flow designer that's gonna be your easiest way actually why don't you want to use the rest out as Brad asks and if you're using OAuth you can use connection alias from the rest step hi Brad I want to develop a flow where I could pass any REST API as an input and invoke REST API and pass a response in output later on I can use this in flow and sub flow in a flow module reusable flow any suggestions you could make an integration hub spoke that just executes some server-side JavaScript instead of using the rest step but a better practice we here would be to make a spoken activities for each of your integration points so you can be specific around the inputs and outputs for each that is correct if you have to use server-side j/s they can use the rest message v2 API this is something that if you've got your REST API is already built like I do for this one for posting to the community or posting to youtube you can repackage them in an integration hub spoke that part you have to do because you have to run the rest from an integration hub spoke or an integration up activity action action excuse me but mcmutt sense for me at this point since I've already invested the time in those to build them out as new spokes with new actions unless of course I wanted to distribute them then I would have reengineer them or for the basic practice of learning I could do that so I like Brad's answer I did not mean to hit reply I meant to hit helpful there we go there is something in the inbox so let's check out the inboxes to see where it takes us there's all kinds of discussions I have been participating too many lately but maybe something's related today get date user last updated a record using glide aggregate glide area it doesn't return those details this is a two year old discussion okay somebody replied hi Chuck I don't see any updated field on the sis added table how can you find the last updated time on a field that would be when it's created really sis audit doesn't have I find that amazing this audit dot list I thought every table came from the global table we have created we have updated account we have update our interesting that's it there's one I didn't know how about that we learned something new every day so if I go to configure dictionary I will likely not see that yep this is created biases created on it is not extended from the global table fascinating get rid of that when we were already there interesting I didn't see that he knew of that you can use the the SIS created on because the audit record every creation date reflects the time the change is made an example state changes from one to five on such and such date oh the whole reason is audit records don't change they are a recording of what got audited let's read this table doesn't need an updated date because those records aren't updated they are meant to record the time and date a change was made and the records are immutable use the SIS on field instead that makes sense this make sense to me all right I have an idea so in my notes I have this link of potential topics and I have been dragging this Google Doc around for close to a year and I keep adding to it and subtracting to it and it's time it's time to put this in a table so when I get an idea I could just jot it down throw it in the table I could even make a mobile app if we like but let's create this so that I can stop using this Google Doc this is the this is the kind of radar you should have in your organization ago oh man there's a spreadsheet that needs to die Oh somebody's really doing this kind of record-keeping in a document or a Google Doc whatever it happens to be so it's time to make a table for this let's go together I haven't done this yet over to my community livestream application that is running on my other instance log in quickly here create a table and think about the types of information that I convey to this show and what I would need to reference that quickly to bring you the best content possible and then maybe transfer a couple of these records over so I'm in studio on my instance make that a little bigger let's create a new table click click done done collapse this section so we get a little more screen real estate and these are just going to be my ideas for this show I did give this a little thought before we started so we're going to need a name something that captures the essence of one of these line items like an update on for each that I discovered based on what I told you last Monday that probably 40 characters is it going to hold it so let's go to 100 and make sure that is the display value should anybody else ever reference that in a reference field let's give a little longer description which could be maybe a thousand characters I like to have an active field on here letting me know if I've already covered this topic or not pretty much every table I make as an active field at some point I may be a bill a reference qualifier let's be ready for it and default that to true I often share script or I captures grit a get an idea of a script that I want to share so let's make a script field for lack of imagination we will call that script and it will be presented on the form as a script field what else oh how about a link to the episode that way when I cover it I know it's already there let's do a pisode will be a reference field and that links to the episode record in my CLS application we could also do with a link sometimes I link back to a community article as a reference so let's do is linked to generic we're sure to be community link I'm a link to something else maybe a Stack Overflow maybe a related list of links would be better hmm hmm let's do that let's do that instead and thought of that so there's my basic ingredients to get me started just scanning over some of these ideas I see places where I can insert code I could I could have a link to a doc article I could have a link to the developer portal yeah I think a related list is gonna be better so submit that I now have a new table and because it's a related list I should put a related litter it is a reference link I should put a link on the CLS for but before I do that let's design this form layout a little better let's clean this up using form designer and while that's loading I'm going to go back here to my episodes of OOP that's tech shorts where's my community livestream there it is and in here this is not a community livestream episode but it is the right forum it's any Content that is posted to the YouTube community let's do configure related lists and put ideas on there there's my idea to episode related lists sounds good form designers up that looks terrible so let's change the first part to to column add a new section for the big fields to be single column get rid of the label we don't need a section called new section put name hmm that 100 characters it sort of feels better as a wide field let's do this let's do a single column then a two column again get rid of a new section put the name at the top so we'll go wide then have some side by side than wide so single column active I like active over there episode that's good script is a big field that should be down here so that's my form layout or the first form layout now let's go take a look at I'll refresh this we have a new table community live stream I did not give that idea any order so there it is this list layout could be a little bit better it's kind of how it goes when you make tables and applications and whatnot we do not need the big fat description on there we do not need a script field on there the episode is nice to link to actually you know what the big fat description might give me a head start let's leave that up there anything else that needs to go in that list not today then we also had that idea field sorry that was the idea table we also need to make a table for links so let's create a new table again and we'll call this idea link and it's going to be pretty simple pretty simple indeed let's create the URL which will be of type URL let's create the text which will be a string field 100 feels good for that uh that probably will do it and I can rearrange the list layout on that don't need to go anywhere for that but what we do want is let's create a new sample record so based on the what is that oh it's a little field chooser thing never notice that before let's go to my potential topics and do you update on for each I'm starting to have other thoughts of what I want to capture here maybe like a date captured probably but just created by I don't have it linked to an episode yet so it's not included but when I do I can easily attach this to an episode okay things I learned about the for each loop in script includes ng it doesn't recognize this I don't have a script example to put in there right now but now that I've got that captured I could also should have done this on the same form put in my idea Oh guess what I forgot on the idea table a link to the parent record you can't have a related list if you don't have a reference to the parent record so let's do that that would be a link to the idea table which is going to be a reference you guys saw that coming right I know you did idea X and C idea link no I don't want it was a reference to itself update that now if I go back and say hey how about a related list because I have that reference field I have that link as well and down below I have links there are no links for this particular one let's go get another example just to see how this works and the fields are in the right order I thought I was gonna have to flip those around let's go back to my potential community live topics look for info on UI notifications all right there's an idea so let's go to an idea record create a new one paste that in it's not attached to an episode right now that's there's a link look at that copy the link copy the link I don't even know what this link goes to so we're going to have to explore so we can get a description in here to create UI notifications in the standard standard UI these are different then just add info message I do want to cover this topic at some point but I don't to lose the idea so save that and in my links that's a terrible form layout I'll get to that in just a minute let's put in the link but I don't know where that goes so let's open that up in a new tab and get the retaining info message on record producing portal I think that's where it was that link had to mean something to somebody at some day so let's configure this form design real quick make this a little prettier we got a name URL idea that field really doesn't need to be a wide layout I don't really care for reference fields that have a big wide layout so let's do text URL I don't know just thinking out loud here quickly see how this looks drag that down to a half-filled aesthetics it's all the rage reload that most of the time am I going crazy did I not save that fine we'll do form layout just to be different it's below a split this for sanity sake I like to put that in there why is it showing up as a big wide field there okay that's what I was aiming for so now I have my ID link or my short idea field I've got my ID link record in my table let's open that record and I should have one record at the bottom of there we go is there anything in here that includes a script not today but I think I'm gonna write some just so it saves time in the community live stream so I will work on populating the rest of those that was fun we now have a collection of ideas we have the episode record go back to livestream I can see which ideas were consumed and turned into topics currently none because I haven't done this before so I have an idea let's make an idea record about this idea get rid of that you go back to the records go to my idea and then I can attach it to today's record so create table for ideas this is a little meta that's going to be on the episode record which doesn't exist yet today find a way to do to get rid of the potential topics document you've been dragging around for months capture them in this app instead okay very easy submit and done and then I will be able to attach that to this episode when it becomes available now what would make more sense as this list grows is to filter out the ones that have already used so let's do a quick pencil icon on that module give it an order I have no idea what order these are in but I'm gonna say it's probably that none this may not be ordered at all let's put this at 500 for now and set the link type to have a filter of active is true done one of the easiest filters you'll always use wait for this to refresh and ideas shows down here idea links is now there so let's put that next not that I really need a module for that but 600 feels right and there we are just augmented the application that helps administer this at this video how about that that was fun is there anything in here that I wanted to talk about specifically today yes the for each okay we're gonna go through this real quick I got about five minutes go to my personal developer instance that's not it that's it and what I found was that for each I talked about this last week and if I go to my little code editor and do something like here is a list of stuff fact now I can't remember where it was so let's go get the code that makes that up that's the wrong stream that's the wrong path let's find this the other way now community live stream maybe was on the 19th there it is for each no idea who's gonna open that up oh good thing vs code will help me so I've got an array of objects and I showed that you could either do this with a for loop doing for I equals blah blah blah or you can do for lists list out for each and then called us it'll function so if I paste that back into scripts background script background and run that I should get a listing of person not named personal computer because I'm passing the item of each list item in here just to demonstrate that I can get the information out of that array I do that and of course I yet Chuck has a Mac Craig is a Chromebook mark has Windows donna has a Mac what you would expect from printing this array out but I found that it doesn't work so well when you're trying to reference the function in a script include so the way the script include goes let's go to my community livestream application and it's in here somewhere CLS perhaps that I don't know if I have a script include did you tell the server-side code let's just make another one why not so under server development script include going to create a new one with coming wait for the forum to finish loading there goes we'll just call this one test this because that's exactly what I'm going to do and I get the little prototype down here I will make a function called list things here print list is a function and I'm not going to pass it anything yeah I'll pass it the list and now I get to sort this code out so I'm going to pass this in as part of my test so don't need that definitely don't need to comment it out code and in here I'm going to do a list for each item and when I reference another function within my script include get my curly braces all lined up here did I lose my function I lost my print function I must have highlighted or something print list function list hopefully we will get these things to start losing their what is this complaining about expected other curly brace that one matches way up there oh thank you autocomplete for kind of screwing with me just making a function in a script include to print out the list but it's going to call display item now this declaration won't work in a script include that way so we'll fix this up function there get this indentation going right that can go away that gets a comma not a dog to comma and here we go so this should really be this dot display Adam if everything I said works the way it should be now you could have done the example I showed last time in a was that two weeks ago already almost you can do that in a day business really UI action anything that's not using a script included but in a script include here's what I found save that and when I try calling that in a test script I need my sample list there's my sample list going to instantiate the new object new test this helped try that a young I don't need to instantiate it here well just UGS info Thank You autocomplete GS dot that's irritating I got the wrong autocomplete thing going on here dot info take that it's more on the wrong way they write code and I'm going to write new test this dot print list and send it my list all right now that would seem to reason that it's going to iterate over every element in the list and call display person one would think but if I go back here and run it it's going to bark at me and say I don't know what test this is okay first it's complaining about the script include am I in the wrong scope no because it's defaulting oh why is it on global something's broke I've been in this since I started in global okay because I know that defaults the right thing okay this is what I was expecting it says I can't find display item in this object what are you talking about and I go to my script include and I say well it's right here there's display item and this is this display atom there is a scoping issue here this is normally how you would reference other functions in the script include but because this is encapsulated in a function itself all bets are off that was kind of irritating I don't know a way to fix this other than reverting to the traditional for loop maybe somebody else does my default background script will run a global no it doesn't it actually runs in the scrotus cope it used to until about Helsinki and I barked really loud and said please please please can we make this drop-down match this drop-down when you go into scripting scripts for the first time so if I change this to CT util spoke and go to scripts background it defaults to CT util spoke if I go to global and go to scripts background it goes to global look it even changes live I didn't know that okay so this will default to the scope because so many times I went in there and I paste him says you're not in the red scope the issue before was that I had already run a global scope and then I changed to CLS through studio through that drop-down but anyway back here it says I don't know what it is and you look at the script include it says sorry I don't know what display item is and my resolution at this point maybe somebody else has a better idea that knows more about javascript depth then i do i do the old for VAR i equals zero I less than list dot length I was trying to show you something really cool about using for each it's not the answer for everything and then for readability I always do our item equals list sub I so now keep typing these square brackets because that's one of those characters on the keyboard where I have to glance down and now this will work let's lighten line that up oh this parenthesis is out of the way and that semicolon needs to get out of the way so that's the modification now if I run this again in scripts background run that it will work there's apparently some undefined element in there or I'm printing something else that's undefined but you get the idea for each in a script include can't call other functions kind of crazy maybe the problem is that you do not have any return in that script include when you call it it's not complaining about the return and I don't need anything return what I'm displaying it's complaining that this is not this this refers to the current instantiation of the object I almost have to create another this test this case object which isn't what I want to do so it's it's a scope issue that it doesn't understand where is display item because this doesn't have one as soon as you go into the for each it's a different like variable scope or something so for safety sake stick with the old method right you can there are a number of places where I still do it as long as I don't run into an object so so much more to discuss that I've learned over the last couple of days and weeks but I'll save those for another episode until then thank you very much for hanging out with me for an hour don't forget if you find something useful you've learned something you want to share it click that like button on the video or mark this article in the community as helpful I'll have it up there in just a few minutes after the can or stops thanks for hanging out it's been great if you learned something share it you'll be helpful and [Music] you [Music]
Info
Channel: ServiceNow - Now Community
Views: 714
Rating: 5 out of 5
Keywords:
Id: J5uroOnBwm0
Channel Id: undefined
Length: 65min 0sec (3900 seconds)
Published: Mon Apr 01 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.