NOWCommunity Live Stream - Behind the Answers - Approval Summarizers
[Music] [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 senior developer evangelistic service now and i am happy to be here it is august 24th 2020 and our topic today is approval summarizers i'll get into those a little bit uh this was inspired by one of your direct comments and questions i think i even mentioned it offhand in an episode a couple of weeks ago and said hey we should cover that because it hasn't been covered in a while and this was one of those topics where as i started to dig in i got more information than i actually was looking for i thought this would be a quick 10 minute topic they never are are they there's always something more that you can see in there thank you for joining me there's a whole bunch of people signing in on youtube i feel like i'm just hanging out with friends today having a chat and this is great i love it you can do so on youtube go ahead and click the like button the notification so you get the notification i believe i've got one here i've probably got more than one here yeah i've got stuff from news and webcams around the house but uh i've got whoa that really threw the white balance off a little bit but got a notification on the phone that uh it is live actually the notifications will show up 30 minutes ahead of time so i suspect some of you are getting those as it shows up on my device and says hey it's going to start in 30 minutes thank you everybody for joining in great to see you good to see the audio is working a little bit loud on that microphone hopefully it's not distorted too badly got the uh traditional bow tie on that's uh that's my thing so happy to be here join on youtube also we do present this on twitch i got a notification if you looked at my phone on that as well we do this as twitch stays around for a couple of weeks you can use it as a backup plan and then of course i also record it locally just in case there's something really awful on the internet today as there has been in the past so our questions are inspired and like today's directly taken from posts you put on the community so if you've got a question today that goes beyond approval summarizers or a little bit of jelly we will be talking about that please post them to the community at community.servicenow.com a few of you have reached out to me on linkedin i appreciate that very much but i generally don't answer technical questions there someone wanted to know about localization on a catalog item or record producer i said that's a great question for the community there are thousands of people out there that are eager to help looking to assist grow their own knowledge and go that's a great question i want to dig in deeper to that okay maybe i'm the only crazy one who does that but no i'm not there's lots of great people out there good morning to everybody any plans on a portal series uh plans yes but probably won't make it we're going to focus more on i will be doing episodes on this on service portal and widgets in fact i've got one planned uh in the next few weeks so stick me stick with me on that i've got lots of plans for pieces but i'm not going to be doing a formal series on service portal um that that information is already out there pretty well covered i'll be doing bits and pieces as i learn them and as i discover them and i think they'll be helpful for you but we really want to focus on the now experience going forward and if you didn't catch it on the 18th we had a great tech now episode go over to do i have a i don't have a link for tech now shame on me bitly slash servicenow dash tech now and you'll get a whole series of that episode 78 we had a great discussion with wolf he went through some basics on how to build a widget and get data from the the server so not a widget a component so you're already still stuck in the the idea uh portal series and data stream on flow designer for backlog i do have an entire series coming up on integrations everything from easy import to guided app creator to import sets in integration hub that's coming so that is in production right now look for that coming up hopefully the first block of them will be released in september so i've got to get finalization on scripting that i'm i'm feverishly working on that that is my project that i'm working on when i'm not working on these projects so looking forward to giving a good comprehensive view on integrations all right let's continue on we kind of got stuck on the community but that's where everything will be posted the developer portal is where you're going to find a lot of the videos that i did in the past for builders no code series you can get a free personal developer instance all the apis are there i'm referencing this on a daily basis it's so chock full of information if you're not part of the developer community please go do so and connect up with others under the connect there's events that are listed we've got three developer meetups happening today this week i believe it was utah minneapolis and tampa bay so those will be happening in the u.s there are others happening around the world so check it out if you want to get more information on that you can look either look under the connect or if you want to sign up for one and become part of that chapter and they get notified when they actually do their meetups well that's over at meetup.com where we've got just dozens and dozens of chapters around the world some of them are meeting more frequently than others so if you want reach out to the meetup organizer and say when is the next meeting if you don't see it on the calendar today very encouraged to that many of you are doing this and i look forward to meeting all of you i should be able to make about two and a half two two and a half of these this week out of those three so i i like being able to attend these if this was a normal work week it would be very difficult for me to hop and visit all three of those and still produce this type of content so go to meetup.com pro servicenow dev program and become part of that we are still running the tell us about your app program so go over to bitly slash tell us about your app and for every application you've built tell us about it give us a little insight that's what you've built we will donate 50 to the u.n covet 19 relief and recovery fund you see there up to five times so you can get up to 250 nominated and feel like you're doing something to help the world be a little bit better place in these crazy times very much appreciated we also still have uh the bit it's still going and everybody's been subscribing and downloading and listening thank you thank you very much hope you enjoyed the conversation last week with dave slusher about flow designer and integration hub concepts the new features that have come out new capabilities that have come out in paris we've got that discussion that dropped on the 19th and bonus content coming out this week i'm not going to spoil it for you all right if you go to the blog the community portal and you look under connect it's on you it's on the events you'll know what's coming out on the 26th that's where i list it if you want to see what's coming out in future episodes bonus episode it's normally every other wednesday well this is the off week and i wanted to put this in in case you missed the webinar with me and david lew oops i spoiler alert and even when those sound effects says hey spoiler alert uh how to move applications from one instance to another would be another nice topic great keep suggesting the topics in fact uh i will try to pull them out of the chat thank you very much uh drop me an email or send me a message on linkedin or something because i i may forget between now and then i love your ideas these are these are awesome uh actually there is a tech now episode jeremy did this oh when was that um look in the tech now episode list it's i think it's called move it and it tells you the different ways to move data and application changes from one instance to another whether it's git or the app repo or update sets lots of great information in there about how to do that so i think we've already covered that i don't know if i'll be doing that on this episode particularly because jeremy did such a wonderful job with that so anyway break point audio discussions no update sets no powerpoint no demos just great open discussion between a couple of friends go find that over at the bitly link you see there continuing on our next tech now since i've already mentioned that a couple of times our next tech now is going to be on september 15th with jivanja talking about upgrades harris is in early access that's going to be about the time when it's generally available and you'll want to start thinking about upgrades there are some wonderful new upgrade tools in paris that you'll want to take advantage of and we're going to showcase them for you on this episode of tech now go over and register at bitly tn79 reg you can find that there all right let's get into today's discussion i should have flipped back to this screen only for a moment good morning was just reading uh in your loaner request application very nice thank you so much for making great content you're very welcome the loaner request was one of the first applications i ever made as a customer back in 2000 2010 whatever it was and it's worked out very well if you've taken the application developer course i believe they're still using that as the lab exercise full of great examples so it covers a lot of concepts that you need to build your typical application let's go to my personal developer instance and we're talking today about approval summarizers let me give you a quick example of what an approval summarizer is you've probably seen them and somebody said how can we configure those well if i look at an approval i'm going to take one that was set up with my demo data you've got your basic information here at the top howard johnson is approving it it's requested for this particular change request and down here is this form layout hey there's some stuff in there looks like similar typical form and it usually starts out with summary of item being approved this is for the benefit of the approver so they get details about what they're proving well sometimes you don't always see what you want and there are custom ways to do this and there's there's there's two basic methods i thought there was one the documents only tell you about one i discovered an easy second way let me look at another one like a request here's a request request and sometimes when you're approving an entire request you want to know what request items are on there now you can send this out in email of course but people will say i didn't get the email we can steer them back to this page or they'll click the link to the approval and get back here and you say this one doesn't have that form down below the ui actions it's got this embedded piece here summary of request item being approved i think i may have messed with this a little bit it's supposed to be down below so forgive me this this instance may be in a little bit of a different state in certain cases so you can see it's got a nice list layout you've got the items you know the amounts they can come up here and say no i want to deny just this request there's some custom stuff going on here but it's still all part of that form so what is a summarizer well there's two ways to show that let me show you another one on a custom table that i did called hey the loader request right here it is down at the bottom and it shows the process flow formatter it's got the what you'll notice is by default it's taking that top section what i call section zero go back and watch the video on the data model and the form layouts and the list layouts all that stuff that i did a couple of months ago but this is what i call section zero it is the top part of the document a part of the form layout there it is again if it doesn't have something identified specifically it will use this top part well you don't necessarily want to take something and go well you know there's a the field down here of stats when was it opened or updated and throw that up there because then your top section starts to become a little cluttered and people are scrolling to get to the fields good practice always put what's very important at the top and then use tabs or sections to put that secondary information okay if you've got something that's really important but still secondary information you can make it the first tab this shortens up the forms i've got a number of these on personal projects that i have to go back and say this form is getting really long group things together as they matter there's your tip of the day so let's take a look at this what if i wanted to make a shorter version of this maybe the approver doesn't really care about um who the assignment group or who they assigned to is that's not important is it not not for an approver well easy step one and this is the one that i recommend you look at first is go to either configure form design or form layout i'm going to go to form design just because it gives me a drag and drop pretty quick for what i'm doing here today go to form design and there is a specially named form view we use our way of presenting this in different cases there's one called ess labeled self-service there's one called itil there's different views for different personas or different places there is a special one called approval it's not on here right now all i've got is default and self-service so first of all i need to get to the right scope because i mean global so let's go to my loaner request scope how did i know it was all grayed out now if i go to configure form design non-rolled users see the top section well they should if a default view is in place and it's not using any special acls or view rules or something to do that let's take let's create a new view i can do that here by saying new view called approval and it made a copy of all of the fields and layouts and order and all of that stuff for this view i'm going to take out this section and let's just go with that example that i said before let's take out assignment group and assign to and all these other sections really don't apply because the summarizer is just showing you this top one when i save that it's all that lovely configuration i now have if i do a reload form it will show here without reloading gotta reload reload that form and now i have an approval view hooray it's a very simplistic i don't expect too many people to actually get here and do that but that view go back to my default view i like that it's got lots of good information and i hop over to approvals look at the approval for this loaner request now look no more assignment group no more process flow formatter creating an approval view is a very easy way to take the default fields and layout and make your own layouts specifically for this approval summarizer that's plan a okay use that one 99 of the time plan b gets in a little deeper it's quite a bit more involved and i invite you to check out the links i have on this episode in the description on youtube or on the links in the community if you're watching it there and there is a page called summarizers in the docs i just search docs for summarizer there it is wonk we're currently using paris so i pulled that up and it says approval summarizers are stored in a macro table from the left navigation you go to ui macros and the naming convention follows this approval underscore summarizer underscore table name now i have not been successful to get this to work on a scoped table for whatever reason but that's why i went and looked a little harder and said i wonder if that's how i found out that view thing worked i said i wonder if there's a view called approval and tried that and it worked so that's what i use for my custom tables global tables another case you can use this ui macro capability and put that in there so if it's on the change request the ui macro will be called approval summarize or change with the underscores an approval summarizer change request or approval summarizer incident approval summarizer sc rec item you get the idea each summarizer is written in jellyscript so i put up a big yellow warning flag this is all about jelly if you don't know how to program in jelly it is one of the underlying languages that we support for doing forums and in the classic standard platform ui not pretty it's pretty it's powerful but it's a bit of a legacy thing it came along in the late 90s early 2000s and it's the templating language that we used for a lot of the classic ui but not easy to find the skill set for that if you want to learn more information i've got a three-part series it was episode one two and three of tech now seem to be referencing that but as i create more content i'm going to be referencing that content because there's no point in doing it over again that was back in 2013 still remains some of the most popular videos i've ever done for servicenow and happy that it's out there a lot of people have referenced it so you can get started understand what ui macros are and ui pages and how to do all this cool stuff jelly some of you have done that but keep in mind ui the jelly code doesn't work in service portal and it doesn't work in workspace so we've migrated technologies but this is a possibility if you want to create your own custom summarizer like you saw on the one for the request let's go take a look at that close out that and they are under ui macros we saw that the one that was for the request item was a bit special so system ui ui macros had a couple of questions come on there's non-rule we already did that just naming a view how does it get updated in the summarizer the summarizer already knows there's there's an interesting thing that happens i'll show you so if you look for name starts with approval there's one called approval summarizer there's one called approval summarizer default and then there's these ones with the names sc request i see request item i see task get the idea in there it says hey if you don't have one specific to this table it goes and looks says oh sc request i'll use that one if it it's it's actually at the bottom of that form and apologies again i think i may have messed up my form a little bit oop sorry for jumping around but let's go back to the approvals before i dig in and look at the jelly code because if i look at the form layout here there's my simple request and it's got a form layout if i look at the form layout it has in here an approval summarizer there is a formatter ui macros are often closely tied with a formatter and the job of the formatter is to make a ui macro available to place on a form it does a couple of other things but if you look down in the list you'll see some other formatters like contextual search result the activities where you have comments and work notes and attachments and all of that is a formatter okay it's it's a ui macro that's put into a formatter some of these are available for you to look at so if i look at the ui macros that i saw before let's go to the history that was faster macro's name starts with approval i should have under system ui formatters maybe something that says approval summarizer there it is that's how we got that name in there they're kind of fun if you if you've ever wanted to make like a checklist or something a reminder a quick ui macro is a good way to put that in there because annotations can be turned off but ui macros can't i used a ui macro in the jeopardy game that i made a couple of years ago for knowledge that went through and checked the records because it was checking a lot of related information and i wanted a checklist that says hey you need three of these and 30 of those and one of these and that's not set and as these things would turn on they would turn green as the conditions were satisfied and when all of them were green you were allowed to play the game so there was a nice way to do that that being said i needed to make a ui macro which included some jelly code some javascript code and then i put it into i linked it with a formatter and then put it on the form so now i've got a nice little formatter on there that's that's a bit of a side track on there but approval summarizer but in here it really just says what is the name of your ui macro and it's the name of the uimacro.xml it is a type formatter and on and on we go let's go back to global so we can actually see some of these things i go back to macros or matters macros macro there it is can you please point me to the video where you have configured the condition builder in a lookup table and reference that condition in the parent table um it's going to be one of the recent ones i think it was april or may of this year in this series so if you find the playlist or community live stream you'll find one called condition fields i don't have the link on me offhanded i don't want to stop talking to stop and look up a link for you but um if you don't find it say in an hour or so or somebody doesn't contribute it to the community chat hit me up i'll find it for you all right here's my approval summarizer and in here is some jelly code again it's not pretty you'll recognize some of it is javascript and it says do you have a macro if you don't then i'm going to use that i'll use the default approval summarizer i'm not going to go through all the logic in here because it does get a little bit uh more convoluted than i've got like i said it took three episodes to cover this stuff this is the default summarizer which goes and gets a whole bunch of parameters and figures out what form you're on and view and does the list layout or the the form layout for you and tells you all that good stuff so it's not a trivial matter however if i've got one on my global table called simple request you simple quest dot list oop do simple something simple racks there it is i've got one task here it's got a very simple this is the default task layout should look familiar if you've ever extended the task table i haven't done anything to this forum layout we should just for fun let's say configure this forum layout create a new view we'll do this one through formal layout this time say i want a new view called approval do the same trick we did before just to show you different way of doing this take out the work notes the description the short description need to take out the end split but make a simpler view for approval okay default view is still intact go back to approvals and find my simple request there it is and i should see a nice simplified version no short description no work notes no nothing easy right that's the easy way i like that if i wanted to override that with a ui macro then i would go to i macros and create one called approval summarizer underscore table name so this one is called approval summarizer for u simple rec got to have the table name in there and i am simply going to put in if hello world nothing fancy a little bit of html i'm not going to put in any jelly or anything else submit that and now system should recognize i should being the key word everything's going well here and it says there's my hello world only because i think i jacked up this form and put it in a funny place because my approval form layout is not the standard one that it should be i thought it would work well down here still putting it there it's above the buttons i i forgot how i got it below the buttons or above the buttons but it's supposed to recognize that and say item being approved and there's the ui macro but i was experimenting when i was building the content for this episode so now you can see if you wanted to get more involved with jelly you could go out and get other records or get related information and pull this together in a nicely formatted style and create your own approval summarizer again this wasn't working too well for me with a scope table for example x loner request go try that just for the fun of it remember my approval view had a couple of fields missing so if i go back to my approvals and try one of the loaners it should look like we had it a few minutes ago ta-da and if i go to create a new macro called approval now this one i would probably want to do in the scope let me try both ways i don't know if it's going to prefix it and the api changes or whatnot so let's go approval summarizer under x owner request okay approve let's put a div tag in there just for being good citizens today approval or motor item just to see if it's working there's the close of my div i'm not sure if it was the ui macro was in the wrong scope or the table is in a different scope that made it a mess hey look approval for a loaner item okay so will work but that was the case where back to my rows let's try putting the loaner request this is in global see and i may not want my summarizer in this in a different scope than my application because it would make it difficult to distribute the application with somebody else let's take that out eat go check make sure that we didn't mess anything up and i include attachments from a wreck for the approval to review you'd have to do that through the jelly you'd have to go and query the sys attachment table find out what the attachments are that kind of stuff so it will involve a little bit of javascript and jelly code in your approval summarizer but yes it can be done jason replicating out of box ui macro is always best practice yes it is if i wanted something that was out of the out of the box but i don't want any that you know i don't need the list of requests items and whatnot but it does provide some good examples always when you've got questions about how do i do something go look for out-of-box examples that can lead you in the right direction that was one of the earliest lessons i learned in my first sysadmin class back in 2008 and it's proved useful when i'm doing this reverse engineering saying has anybody else ever done this do we see an example of that somewhere else in the code and the code search is really nice in studio for doing that the uh where am i going oh i deleted that so let's go to my loaner scope owner request there it is i just want to make sure that the approval for that is back to the standard form there it is yay let's go create a new ui macro same name as before approval summarizer and here's where i think it goes off request in a scoped application just like if you have a scope script include a scoped scripted rest api watch week's episode it changes the api name and i think that's where the global default approval summarizer is getting confused it's looking specifically for approval under summarize or under table name this is not the name anymore because it's got the scope out here messing it up x loaner approval summarizer x loader request that's not helpful but let's try it anyway give boat approval for loner item api name has changed because it needs to be scoped so you could have multiple ui macros in different scopes it's part of the scope collision thing like properties or script includes that helps keep you from getting in trouble and you can see the approval has not been affected it's not picking that one up that default approval summarizer goes uh nope just going to use the normal view do you have a no do you have an approval view if you don't have that then i'll use the default view that's where it's getting that information hope that clarifies the hierarchy of how things are done if you have a table specific approval summarizer with the api name approval under summarize or underscore table name it will use that first if you don't have that and of course that requires a lot of skill and effort and finesse to build that out in jelly but you can do that that gives you the ultimate flexibility ultimate power if you don't have that it will then default to look for an approval view for that form for that table if you don't have an approval view it will use the top section of the default view so that's pretty much everything there is to know interestingly enough there's nothing about the view part of this in the documentation that's what i found stunning is just a little random experimentation went oh hey how'd that work and why does it work well why it works or how did it work i discovered by going through some of that jelly code and saying what are you looking for what are you doing in here what happens if i don't have that that's how it works and allows you a little bit more flexibility to use something other than the default view in the approval summarizer it seems similar to the sys pop-up view for reference field in the form very similar yep if you define if you define a view for that uh pop-up it will be there otherwise it will use the top section uh nothing about jelly or ui macros in in the aesis reference pop-up so good information maybe we should do that in the future too i haven't talked about this pop-up but i did views not too long ago so go check them out they're under the list and form data model episode i believe looking quickly for through questions can you please point me to the video no no we all got that can we modify the u out of box macros yes you can modify the out of the box ui macros but you're going to have to address them as potential skip changes in the future so like i said best practice is to copy the ones that you've already got if you want you can deactivate the out-of-box ones the uh there's there's two philosophies of thinking when it comes to this is just a little bonus content since i've got a few minutes but when you modify something that we provide you maybe it's a ui macro let's say we'll go with the ui macro if you modify that the the one that we give you it will be flagged in the next update and say hey you you've modified this do you want to keep the changes you want to revert to baseline what do you want to do maybe it wasn't even you maybe it was one of your predecessors 10 years ago that made these changes and you just want to know about it because servicenow is now trying to upgrade that give you new functionality that's a good thing in my opinion you want to know that conflict existed so there's nothing that says do not modify the out of the box components because you may want that reminder you may want to consciously say we acknowledge this we're moving on we're sticking with our functionality or we would like to revert this and take a look at what servicenow has done that potentially supplants or supersedes our technology our implementation to make this better okay that's one way the other way is if you want to silently do this you make a copy out of the box and you can deactivate the one that's that that we provided so now you've got a copy you can modify your own copy leaving the other one intact uh depending on what it is it may you may want to deactivate or may just override by itself you know look at the functionality that happens there then you're not impacting any upgrades however if servicenow upgrades the ui macro the script include the business rule whatever you copied you're still going to be using your version and you may be missing out on functionality that's coming along so you don't have as much work to do on upgrades but you may be missing out so there's there's two ways to look at that talk about that with your architecture team talk about that with your system servicenow program team whoever whoever's in your organization that oversees the way things are changed and made have that plan of how are we going to manage these changes in the future because you may in fact gain value out of being annoyed on every upgrade just to be aware that something was upgraded and if it's the same 60 things every releases where you go yeah we know we're going to stick with our own we're going to use our own macro we're going to use our own ui action we're going to do our own thing on this take a look at what the out of the box record looks like anyway because you can have that side-by-side comparison and go oh look there's a whole new role involved with this that we didn't know about we probably want to either adopt that merge it revert whatever you want to do so uh deactivated copy is always my way to go that's one way to go but in recent years i've been re-evaluating that practice and and saying maybe not maybe not because you could be missing out on several things that are coming along we had a customer that had purchased performance analytics early on and made a lot of copies of things and as performance analytics matured and we got more functionality they were not getting that because they were still using their copy of this and they really looked back and went what's going on i'm reading about all these features in geneva or jakarta or whatever it was saying we're not seeing that and it was because they did the copy thing instead of the modify out of box thing so there you go that is my message for today i really appreciate everybody joining me it has been a treat hanging out with friends put it on your calendars mondays and thursdays 2 p.m utc that would be 10 a.m in new york it would be 3 p.m in london 5 p.m in moscow 6 a.m in dubai something like that 7 30 p.m in india lots of different places you can look that that have time zones figured out from utc not gmt not british summertime things will change in the fall i'll give you an updated schedule on that so that's why i use utc it doesn't change and i don't change and i don't have to do any math but unfortunately the people who do switch their clocks in the fall and spring or twice a year they do apologies for that write your congressman or state representative if you want to get out of that until next time hey join me next time we will be talking about let me get down here to my notes where is it where is it thursday is going to be a very special episode we are going to be talking with some of our internal solution consultants about a hackathon we recently did and some of the things they built in integration hub and how it impacts you where you can find this information talking about the benefit and how they did it this is the first episode of community live stream in almost three years where i'm going to have some guests on so fingers crossed on the technical issues on that one too i look forward to talking to you again on thursday for that very special episode i'll have that socialized probably tomorrow morning so you can start putting that on your calendar but thursday 2 pm utc i will talk to you again real soon until then take care [Music] bye [Music] you
https://www.youtube.com/watch?v=HEC47AN8DRU