Leveraging Gen AI for Analytics - Code Assist - Platform Analytics Academy - October 18th, 2023
[Music] okay um good morning good afternoon good evening thank you for joining platform analytics Academy on here today October the 18th uh greatly appreciated for anybody that is a returner welcome back if you're new to this uh welcome glad that you came hopefully you will definitely get something out of this and you'll be a returner uh in a couple weeks and going further so real quickly I just want to kind of go over a couple of logistical items and then we'll be able to get directly into our content which we are all very excited about so with that um as usual this is always for you uh we're trying to bring fresh ideas better understanding and some practical guidance to using uh reporting performance analytics uh platform analytics experience and other things within the platform itself so uh again this is for you this will be recorded it will be out on the community later on this afternoon or early tomorrow morning it as well will be out in our community on our YouTube channel so you can look for it there as well uh Q&A please ask questions utilize the Q&A if you can we do have other panelists that are on the call that aren't presenting today uh but they'll be there to answer questions and if they can do those via type they'll do that if they are questions that we need to answer live we'll definitely do that as well and if we need to stop uh at a certain point because it is relevant to that we don't mind doing that as well if you do ask a question that is unrelated relateded to the content that we're covering today please feel free to ask those those as well and if those can get answered via type or if we have to wait till the end of the call when we've covered all this content we'll definitely try to get to those as well if we don't get to those then please uh ask those questions in the community and you can tag any one of us that are on the call today and we'll definitely help you get the answer uh to that question uh Safe Harbor so um Adam may talk about this as well uh there may or may not be some some content inside of his uh presentation today that covers that but we always like to make sure that we put it here just in case um just so you you know know that whatever is here today make sure that you keep it in context as it's related to The Safe Harbor um and this is actually a little bit wrong because Adam is our host and I've I remembered not to that I didn't change this as soon as the presentation started but I am Thomas Davis I am your uh host today and Adam actually is a presenter and I have uh Tara and Dan is here as well and we're all here to answer questions but Adam himself um and if you you never uh experienced one of his sessions then uh sit back and relax is going to be a really great one but he is the presenter today and today we're going to talk about leveraging gen for analytics code assist and again we all look forward to this so Adam with that it is yours to take over great thanks Thomas I'm just gonna switch over and we'll pull up my deck which doesn't which doesn't have such a good graphic as what you had I I'll go ahead and turn my camera on for today um and everybody seeing the presentation we are all right great so let's get started um today we are talking about using now assist for Creator uh and some of the use cases that we can use for analytics um I've made it to the first slide before the Safe Harbor really came into place we are working on now assist for analytics uh on how we'll use um AI to really power our analytics but what we're talking about today is how we use what's already released um there is more coming uh in next year but today we are looking at stuff that was released uh actually last month and now assist for Creator um and if if you have any questions about licensing that's something you want to talk about with your uh with your account team um but we're going to talk we're going to be using now assis for Creator um and those use cases for us all right so we're going to be talking about just a quick intro into what now assist isum and specifically now assist for Creator and then we're going to talk about where to we script uh now now Isis for Creator um has a few features today and I'll talk about one that that uh is coming out so I made it to two slides and now need the Safe Harbor twice um and then we're going to really spend a meat the the the meat of this presentation doing a demo um so we'll I have some things we're going to walk through but you can throw some other things at me we're going to do a live demo with our AI uh with now assist and then of course as we go along we'll do Q&A at the end but if you have questions please uh put them into the question and answer panel as we're going so we can we'll answer this all right so now assist for Creator where the real focuses for now assist for Creator is our developers um and what you'll hear us refer to a lot of the things are are generation uh so we have code generation co uh flow generation is is what we're working on uh to come out later this year well you also hear just kind of referred to as text to code text to flow uh text to analytics when it comes out um the the real names are flow generation code generation but I'll probably slip up like I do on the slide and talk text to X that's Crea there are many other now assist features those are generally not in Creator they're going to be in now assist for itm now assist for CSM um and all the different workflows so what we are talking about nysis for Creator the two the two skills that are released and we refer to these as skills on where we're using different AI models the first one is um now is flow recommendations so if I'm in flow designer we're not going to use this today but just so this is in here if I'm in flow designer when I add an action it's going to recommend the next action when I add actually after that it's going to recommend the next action based on the trigger that I picked and everything that comes out really great time savings because I don't have to do so many clicks and it's really really common as to what you're going to do next there's only so many patterns that come through but the llm is learning and recommending what makes sense based on what you've done uh for all of Creator it's generally done on sub prods because we're talking about flows we're talking about scripting um it's not restricted it actually would work on prod but generally what we're doing and everything we're going to be doing today we would want to do in a subr and then we promote it up to our normal means once you activate this there's no implementation so we can just turn it on and it works um yeah turn it on follow the docs and in a few minutes it's on it's working the real key thing on what we're doing and this is for all the generators flow generator code generator when we get to analytics generator your your success depends on your prompts and so we're going to be talking about how do I write a good prompt you have to ask it what to do most of the other skills or many of the other skills have to do with data and whether it's summar summarizing or reading um sentiment whatever has to come through you you have to implement them you configure them and then it just works for all your fulfillers in this case I'm we're really talking about how do we empower the analysts to create new things that make life better for everybody else but prompts are very important it's important that you uh stay up to date with where our recommendations are for prompts on how to get out what you're looking for so uh like I said flow uh now assist recommendations for flow designer this is in uh flow assist and I can turn this on and then as I'm working it's going to recommend the next step if I do a lookup it's going to recommend do you want to do a four each do you want to do an update those are the common things that happen uh and it picks those out for you and recommends it um again this has been released um and and is ready to go right now what we're going to spend our time today is now assist for code is the application name um the skill that you'll see is code assist when it comes through and for for code assist there's two main modules two main functions that happen uh they both come together they work together but just as we walk through these things we have code generation where I can give it a comment um you might have heard this as as comment to code or text uh text to code I give it a comment and what I want it to do and then it does that the other part we use is code completion and code complete where I might start um part of my code and I can have it complete um we'll be talking about both of those things we'll be demoing both of it as we go and Co now just for code and code Generation Um as we go through couple of use cases we see that we'll see here so things like a switch or a try sometimes I don't remember the syntax code complete will just do it for me and it's not just a template it's not just uh intellisense that said here are the values they come through but it will actually give you different code based on what you've written um and like we'll see an example we'll go through with switch statement on how the different switch statement based on my variable names and what I can get out of that it's going to recommend uh or suggest different codes different code to complete so the better you the more information you give it the better the recommendation is going to be more is better um really great I use it a lot for exercising apis because in the in the past I would go through and I would uh I'd have to bring up the doc site and I'd go find an example if the example wasn't great maybe I would I would go to the community i' Google Google it give me an example of this API call I go look at the API call i' paste it into my code and I have to go edit a bunch of things all that goes away because as long as I know if I know the name of the API great and if I don't I can describe the API and it will give me a lot of the parameters the common things that happen and the more again the more I tell it I want it to do if I give it the actual API name it's going to use that API name if I tell it which parameters I want to send it it will do it if I describe the parameter it's probably still going to be able to get what I want and then it's also really important with uh with now assist context matters we're continuing to expand another Safe Harbor slide made it to slide seven right this is a lot of stuff coming in the future but context matters it will work today based on the other code that's in the script block based on uh a script include is different than a fix script is different than uh an email script it understands that it's going to generate the right code incredibly powerful helpful and it just saves me a lot of time from having to go get those examples I still have to read the code that's generated but man it's great time savings um but that context matters and and and again because we're building this with service now the service now team is building it we're adding in as much context as we can all around the place and it'll continue to evolve and get smarter and understand where you are and what you're looking for it's not just vanilla JavaScript that's the big difference right we're talk we're focusing mostly on JavaScript today but it's not just a code generator it's not a JavaScript code generator it's a service now generator for in all the different skills all the different places you need different code we're going to see what goes on and we'll hit more of that in the demo um and if we put those in the chat in the Q&A we'll try some of your suggestions some of the things you're looking for all right now let's talk about we to script so for analytics this is where we're going to spend uh the majority of our time first thing we're going to talk about is is relationships U and these are system relation under system definition relationships uh relationships I really like now this is not super analytically it's not a report it's not PA but I find this incredibly helpful for my users so I wanted to bring it up relationships allow us to create related lists that are not just direct references so whether I'm going through uh a a multiple dotw walk reference um that's important or just really common information I want these work in both classic and core UI core UI I've related list in my bottom but it also works the same in workspaces to bring up to let me Define related lists so a couple examples that I'll have where they're not straight references are the same colar incidents with the same collar uh changes to the same CI where I'm taking one field in what I'm looking at it's still data that's based on my Form B based on my record but I'm able to get other things that are going on so if I have an incident I want to see well what other incidents has this caller had or what other incidents has this department have the reason I bring it up here is because a lot of times we have to have reports that come through or I might have a dashboard with interactive filters to bring that information together well now I can just do that on the fly as a related list now we got to have a little bit of um control here a little bit of self-control because it does have to load them and query them so I don't want to do it for every possible thing that's out there don't want to have 300 related lists at the bottom of a form but if there's some that are really common really important to us then I I want to look at using a relationship and defining those so we'll we'll look at those next the next part we're going to use if I remember right um Hey Thomas I believe we have a poll that's coming up so I have a question we're going to be talking about Dynamic filter options for a second um and we have a quick poll question about how your uh your use of dynamic pole Dynamic filter options uh but Dynamic filter options if we haven't if you're not familiar with them that's this is me so is me super common comes out of the box we can write our own so if I want to have is my department um is in the same groups as me um whatever you want to have you can have um really really useful for joining extra data that's out there like I'm I'm uh has a short description of something or this and this and this and this and then this whatever the case may be we can have this effectively run a query a pre-query to come through I I'm a big fan of dynamic filter options because they provide a better user experience for our users because they can just do is me they and I never want to have a user have to type in javascript. something I want to have my reports customized to them and we can that it it removes that the complexity of some of the reporting so really really useful to have and then it also allows us uh to make some reports more efficient rather than having big Big Dot walks and several layers of dotw walks we which we talked about last or two weeks ago it allows me to do some shortcuts the way that Dynamic filter options work is that they run first and then run and then they provide that information to the main query so there are there are use cases for these where it allows me to get a subset of the data that I want and then pull back uh to to them um and just make really complicated queries a lot less complicated like uh one of the ones I might use would be give me all the CIS that have p1s right now because I want to see or have outages give me all the cases for for CIS that have outages right now something that I have to kind of get data from multiple places but I can what I'm asking for is really consistent like I want CIS there's no variable there I just want the CIS that have outages right now I can Define that as a d filter option maybe we'll try that one as we go live all right so we talk about D filter options uh I believe I can share here we're going to end the poll um so right now it looks like hopefully we're sharing the poll results um okay great um from there a lot of people using them great this is going to make them easier for you so we're gonna we're going to look at it to make it easy to do um particularly for those people who I have to ask my developer to do it maybe you can do it maybe you can help them along I want one that looks kind of like this um and then with if you're not creating them or you don't know what it is hopefully you know now um and if we don't create them you know what I hear a lot of times is that they requires scripting and I don't do that well hopefully now assist for Creator is going to help us lower that bar so it's something you can do because it does provide a better experience for your users and again the perform some of the performance boosts can happen are are quite nice to have all right um next we're going to talk about something we we talked about two weeks ago again remote tables uh and yeah thank you for pulling that up so remote tables I lifted this slide verbatim um from two weeks ago uh so remote tables allow us to one get remote data and Pull It in which is really useful really important but it also allows us to summarize data that's in the instance it doesn't actually have to be remote it allows us to create a table it looks it smells it behaves like a table in service now it reports like a table really important it we can create any of our reports on um on remote tables but it allows me to generate the data via a script and whether I'm pulling that via a integration Hub and an API from external data or I am summarizing and running a Glide aggregate because I want I want to run an aggregate out of an aggregate we can do all that remote with remote tables remote tables uh for right now do require scripting which is one of the reasons we want to talk about them here and if you want to know more about these this is we had a great session two weeks ago on on several topics about uh shaping your data and Reporting on on bigger data extending your data um we talk about it then but we're going to run through some examples with uh with how we write that script and make it easier to write uh and oh poll is ended all right so some people are using them we have few people using them a lot of people not using them um they're not they're not for every use case um to come through Dynamic filter options are one that everybody should be using remote tables with the right use cases they're there but because they require scripting we're going to talk about them um and now okay I think we're done with the polls hopefully that's gone away thanks for that for that input appreciate it and then uh as we talked about for dynamic filter options we ran a session uh earlier I think that was earlier this year in April on Dynamic filter options we talked about in the master dating relationships that was two weeks ago uh we talked a lot about remote tables in there as well as a few other topics that listed here great sessions if you're not familiar with them they're in the archive they're on the community um they're on YouTube you can watch them get the slide de for them um but they'll go through in more detail and what we're going to do today is once you know that you need to have them we're g to make them easier we're going to do that with code assist all right next one I have in here I really should have done animation PA scripts I'm not g to talk about PA scripts I'm not going to use code assist for PA scripts um I actually even haven't looked if it works for PA scripts I think it should uh but I'm going to recommend not to do that and the reason for that uh we covered in a different academy uh a while back about descripting performance analytics uh PA scripts code assist would make PA scripts easy because they're JavaScript but they're not particularly efficient uh when it comes through so in there's certain cases we're definitely going to use scripts but what we see generally is that people overuse scripts because they're not fixing their data um before you use a script I want you to watch this session about some of the the cases where other ways of doing it where we're going to get better performance and more Reus ability better user experience we're going to get more out of the data if we don't script um there are a few very important use cases for scripting that's why it's there we watched that this previous Academy will I'm not sure if I did this one I think I might have done this one I'll tell you why when you should use them and why you need to use them because they're absolutely needed but then the other cues is uh I I just I don't want to make scripting too easy that we go to it and not do things the right way so this this session talks about that hey Adam real quick before you go further because we did have one question that came in about remote tables and and it's a kind of a broad question but not so much but it says in my experience remote tables are slow customers asked to reference core system tables for interface to work what are the best use cases for remote tables I know we talked about some use cases last session that you keep referencing uh actually quite a few uh different use cases are are referenced inside of that session but I don't know if you want to elaborate on that any yeah well the best the best thing I'd say for use cases is go look uh go to your inance go to a PDI go look what's out of the box some really Advanced use cases that are in there uh particularly with um service catalog and where we have to get a bunch of data together and format it in a very specific way um obviously actually they're used for remote data so the the default use case is I need CSM data and I need or call center data something that's not in service now and I don't need to load billions of Records in for something I need occasionally so when I bring up the record uh is actually often used as a related list um it will automatically go out and pull back that data for me um so in the integration of remote table use cases there now speed for that has to do with the speed of integration um so if the response is slow or you know the connection between uh the systems is slow then then it might be slow right a few seconds um to come through that's why there's caching as well caching can be important particularly caching just for like a minute um to come through because but it because normally it's live all the time but if you turn on caching it'll do it so it allows me if I'm sorting it won't be a problem um inside the system it's as fast as it can run there's no inherent um slowness about it um but it's got to run the query and again I might cach it um where I've used it for an example that that I that I used it on was I wanted to display PA scores and I really have no idea why I wanted to do this but I'm pretty sure there was a real use case of this I wanted PA scores to be shown as a chart I think what we had was like in with all my CIS or there was something we groups like The for each of my groups um I had a list view or I wanted to do a list view that had like uh the number of open incidents and the the SLA attainment or something to that effect um something like a multi-level pivot is what I wanted to get to and it didn't uh or a multicolumn pivot um which I think we have in next experience or is coming in next experience if it's not there but this allowed me to have a remote table that ran a Glide aggregate gave me my first score for My First Column and then I could call the PA scorecard API and get the second column so I could show PA scores in a report right and and do some more manipulation on it not super common I will give you that but it was useful for what I needed to because I wanted um real data and this PA data next to it next to each other so I was able to call this API to come through um so particularly if you wanted to expose some some normal traditional data with an API whether that's integration Hub or whether that is an API that we have you can do that uh um yeah that's the where I've seen it I've I've used them for Glide Aggregates most of my cases have not been Integrations they've not been remote um but just kind of running a Glide Aggregate and so I could run an aggregate on an aggregate um like a lot of stuff for groups is where is where I remember using it and if you look out a box you'll see some more use cases great thank you Adam we're good all right um okay so we talk about these script oh let's talk about a few other use cases before we get into the demo so a few other use cases to come through so fix scripts and the reason I put fix scripts in analytics is because I want you fixing data so if we change our process we change our data a lot of us a lot of conversations I have have to do with well that's the old data this is the new data let's fix the old data right so um best best example I have is years ago um there was an issue or something that came through where um we could have a task I think it was specifically incidents where they had a Clos date but not a resolve date like if you canceled them it would close them but not resolve them but some of the PA data we had was looking at resolve and so we had to have this real convoluted indicator Source where it was well if there's a resolve date or the resolve date is null then you want to use the Clos date if closed dat is something it was complicated it was hard to understand wasn't necessarily efficient we fixed the business rule we fixed the business rule so that didn't happen anymore so if you canceled it it set the resolve date and the close date to the same date but we got to fix the old date data now that's a hassle it's a hassle but with a fix script it's not so we can do that so when we're deploying changes we want to write a fix script to go and this is how you fix the old data so our reporting is consistent going forward and we might make some assumptions we might do if it's this do that whatever the case is going to be but we can fix it and I want you to make sure that when you're talking to your developers and you're you're changing a process you're changing the business rule that you're thinking about that and you're getting the data fixed if it's fixable you know sometimes it's not and we're really changing a bunch of stuff and that's okay but if it's fixable let's fix it we're going to do that with a fix script yeah you could also do a flow but fix scripts are quick and easy and it's a great use case to match with now assist scheduled report conditions um when you run run the schedule report there's a you can make it conditional so sometimes we have report scheduling every morning um right and sending me an email to come through or once a week it's sending out well we can write conditions there any scheduled job can actually have a condition like I only wanted to send it on uh uh the first Monday of the month um let's try that we'll try that one in our demo and some of that well what's the JavaScript for that and what's going through now assist is going to help me get there you still need to test it but it's it can help you write that code particularly if you're not super familiar with all the possibilities notification email scripts if for sending those out again adjacent to analytics as we come through um great use case for that um and then metrics if we're using scripted metrics a lot of us have stayed away from that and I do recommend staying away from it if we can just use a duration metric or something else but if we need a scripted metric it's a script we can use now assist couple places I don't like to use now assist um and I should put PA scripts on here because we talked about that before but one PA scripts I don't want to script PA if I can avoid it um and I'll do it if I need to all of these if I need them I'll use them of course but there you know there's often a better way next one of business rules there are use cases where we need to use business rules but they're often overused so I want to make sure uh I want to see if I can use a flow first a no code flow the best script is the one you didn't write so I want to try to avoid business rules and use flows the same thing with script actions I want to avoid script actions which have to do with events I want to use flows um import set Transformations I used to do a lot of scripting when I was pulling in data and I had to you know coales this or merge these two things together a lot of that could just go away if I'm using integration of imports drag and drop pills built-in Transformations it's faster it's easier it's easier to read it's easier to do all the goodness with integration Hub um uh Imports so just because you can script doesn't mean you should script that's the important part of this slide but there are places where we do need to script um and we'll do that as we continue on the Journey of making you or having to have you script less we're still going to work on that to get to to completely low code um and and no code for now let's just be really diligent about where we script and where we don't script all right okay before we get to the demo um is there Thomas is there anything in in the we need to address no you're good you're answer them all and you don't even know it all right I don't have the chat up all right so let's get to the demo but before then um you're you're gonna see this call me out if I do it wrong um a couple dos and don'ts to come through this is in the docs there's some great docs for now assist um actually I guess my next SL is about the docs um but I think one of the things I I want to stress we talked about this at the beginning prompts matter they really really matter matter here's some examples of dos and don'ts a lot of us well I'll say from personal experience if I go to uh to Bing or duck duck goo or that other one that I forget the name when I put in a search term I really use very few words I you know I put my keywords in for now assist and generally for AI you want to be more verbose the more you tell it the better off it is it doesn't can't read your mind but it can if you tell it that so we want to use very specific directions so one of the examples you'll see and people pull it out if I say get a count of something um some at least early on our generation we'll see where we're at today uh it might do a Glide record in a get row count um for those of you who've taken our scripting class you might go you're not supposed to do that if you're going to do if you're just trying to get a count do don't do a Glide record and a row count because it's not as performant as using a Glide aggregate um okay so one we're going to work on the llm to do that when you just say count do this although there's some use cases about why you know is it just the first thing and what you're going to do next but if you say get an aggregate it's definitely going to use Glide aggregate it's going to know so if I know the API if I know the table name that I want if I know if I know that use use that if not describe it and it will will do what it can for that um but be be specific is as specific as you can this is a tool to assist you you still need to be able to read JavaScript you have to be able to know what it does if it can get you 95% there but you can't identify the 5% that's missing it'll be still have a problem right it doesn't matter doesn't work right it's not doing the right thing but it makes it really easy it makes us less less to memorize less to look up and faster to go so it's you do have to have some JavaScript knowledge you have to have some service knowledge you have to know how to look it up you have to know how to test it um and run it make sure it's working but it's going to make it a lot faster and really help boost you up uh to get to more of a comfortable level of what's going on all right and the last part before I actually get into the demo the docs got some standing documentation on this that walked you through some of the things we've done with troubleshooting um also explains more about the data processing and data collection all that stuff comes in it's important things to understand um in the world of AI what what that goes on uh to come through but uh great documentation make sure you reference that we're continuing to approve it and expand it but what's out there is is enough to get you going okay and with that let me uh let's hop over to my live instance and and go through it and I'm going to be ready for you to throw me in the ringer all right let's go through a couple of examples so the the first one we talked about was uh relationships so let's go to relationships I'm going to go to um let's go to incidents actually we'll pull up an incident form so as we go through so we're looking at in incidents I'm looking at the self-service view maybe I don't want that let's see if we have the default view or not the defa oh there we go default view so my default view I want to add the number of uh uh I'm gonna write I'm gonna add something that's that just definitely comes back with data so we have the the task slas effective CIS impacted Services child incidents great I'm going to go in other open p5s um that's not something that I would normally do normally I would do callar but with my test data Maybe it's not the best um so we're going to come in um we're go ahead and open up a new tab we're going to duplicate this and we're going to create a new relationship and for relationships that's under system definition so we'll go to system definition um we'll also see by type in relationship it would have come up as well so is it safe to assume that requires this admin then relationship which makes sense but just want to make make that clear relationships um not under my CI but it's actually it is under system definition relationships but yeah we are um this is definitely something that an admin needs to do it's something we're going to be doing in a subpro so I'm going to click new and I'm going to call this uh other p5s again this one may not be there but just think about this other for the Department um other for the CI whatever comes in where there's not a direct reference I'm going to pick my pick my applies to table which is this applies to Incident That's the form we're looking at that's the the record we're looking at and then queries from where is it getting data from and in this case it's also incident I'm looking for other incidents but this could be problems this could be um it could be anything you want it it doesn't matter but it's going to query when I look at incident it's going to query in this case incident now here's the point right I got to write I gotta write a script to come through so uh I'm just going to go ahead and delete that and what do I want it to do what do we say we want to get um uh get active um P5 I think I think this was a P5 or other sorry other active incidents with the same priority now to call this I am going to I hit um control enter either hit control enter or you hit command return depending whether you're on a Mac or Windows and that calls um that that calls now assist so what this just did is it's giv me a prediction and in Gray is is what's coming in now I can click off of that if I click off it it's going to go away it's going to let me reject should let me reject yeah it's going to reject the the thing I don't like that code that's fine um in this case I'm g go ahead and call it back and have it uh predict again um to accept it I'm either just going to click on the code or I can hit tab I'll click on the code now one thing I call in here um that it actually added part of the comment because it figured out what we could do in assume based on this I actually wanted to complete the word incident um and it will add comments to what it's doing u in certain cases if if it's add lot of code it Le that common steer code for you but in this case what we have in here is current. ADD reccord now that may not be familiar to you because it's not super common current. add query like this is really really specific to relationships context matters it knows that I'm in the relationship form and it is adding code for that and in this case it's saying well we want the priority of the queries from table to be the parent priority that sounds right and I want the ad active query that that which means that current has to be active that is exactly what I want to have I think this is going to work and be fine um a note it is not validating to your schema so if priority wasn't actually priority it was U priority I've added a custom field it won't know that it won't know that so if I didn't want it to be priority and I wanted it to be some custom field instead of saying priority here I'd put the name of the custom field I can put the label it'll guess the field name the the U underscore is better um but in this case it knew what I was doing so I'm gonna go ahead and save this and now um I have other p5s it's the wrong label but that's okay I'm going to come into my form I'm going to configure related lists and I'm in the wrong app so I'll have to go back and fix that but we'll be okay um and in here we're going to have what we call it we call it other P fives now you'll see the relationships um for references it always has the table name and the field name because you can have multiple references on the same thing we'll see that for like caller um we we should see that for straight for straight references but you'll see some things that are relationships they're not going to have that dot so again we're going to do other uh this should just be other incidents of the same priority that's what I should have called it we'll click save and now what we should see at the bottom is other incidents with the same priority and what we see is these are all these are all p5s if I come back to incidents and in my incidence let do all if I wanted to pick up different priority so we looked at p5s so so let's go to other p1s we'll just click on this this one which is a P1 we should see other p1s at the bottom if I wasn't in the self-service view I added that to the default view so I need to go back to the default view and in the default view we have other p1s that are going on again we did a pretty simple use case but really really powerful if these are the things that you want to see a question came in about uh does this work in related list condition related list conditions uh no it does not um it does not do that today um but uh that is one we're certainly working on on to talk with our uh our inbound counterparts to go how do we make this work because this is an incredibly useful feature it's one of the most underutilized that I I see um but it just makes a great um user experience right and again I don't need a report because that's what I want to see I always need to know this and so we can show that here all right uh next from relationships uh after that we we had remote tables let's bring up remote tables so I'm going to go to remote tables and remote table um we're actually not I don't think I don't know if we're going to create it but let's let's do an example of one so I'm gonna click on new what I'm doing is the new definition now one of the things that we see here is that there's a lot of code in here this is scary it's scary for me um I'm going to get rid of uh but actually I'll say this really important in um remote tables is the vtable fun V table module and the V and the V query really really important we have the examples in here which is nice but what we want to do um I'm GNA come in here I'm just going to put a comment in that is uh what do I want to see anybody got any any uh suggestions I'm gonna go with um get the number of active Problems by group all right let's do that um now I actually didn't press the command in here there is a setting in now assist that will actually automatically fire now assist for code or code generation if I sit idle for two and a half seconds so it knows I've been doing too much um and it's just kind of going all the time and recommending things again I get my recommendation in in um gray I'm going to I think it looks good let's go ahead and click on that um I'm going to full screen this so we can see a little bit more so what do we have here so in the normal execute query which is important I put my comment in it's doing a Glide aggregate of problem which is correct I want the active problems I want to count this is counting the assignment groups which is fine that's not super important here we want where it's active um get aurate for the count of assignment groups this really should have done a uh a group ey um see see for each group I'm actually just going to go ahead and get rid of this and do this again now that could have been something I looked at when it was gray it's okay I'm just going to regenerate it no I don't like it I'm just going to reject it again and group group by Group by group let's see what let's see if that confuses it no so it's still in this case I I don't have on top of my mind how I want it to tell how I want to tell it to do a group ey but this is okay I can still come in and I can do an a DOT groupy and that's just an assignment group that's right but a key thing here it knew to do a Glide aggregate it knew to add to use the add aggregate to get aggregate because I'm in a remote table it knew to create an object where my it's going to expect my field names to be assignment group and active problems and then it's going to do that add row and return this out so I did have to add a line here and and let's let's try it let's see if this works so I'm going to go ahead and I'm going to exit full screen mode um we're going to do get uh not get um group problem counts we're going to save that oh uh the table We're not gonna say uh yeah we're gonna save it um I you actually need to define the table first that's so that's a problem okay let's do this we're going to come in here we're going to go to remote tables now one of the things that's interesting that comes through is it hallucinated field names for me but that's because there was no table um it it didn't exist so it had to it had to come in and go well we assume you want active assignment group to be assignment group and we want active problems that's a pretty reasonable description for what we're counting based on what I said so it's coming up with reasonable things but not necessarily the the default things so those are things you have to check I actually like to have it write the script first and I'm like oh that's a good variable name and I don't have you know V1 and V3 and and gr it's it's giving me more meaningful names when it can when it when it makes sense um so we're going to come in and I'm going to create an assignment group and active problem so I'm creating my table it created my my name for me uh oh yeah we definitely want it to be a remote table that's good and my column names are going to be assignment group and problem I think it did problem counts which I don't really like but we'll fix oh active problems that's okay I'll take that active problems I'm going to save this this is going to be an integer this is a reference to CIS user group I could type in groups but there's lots of groups and I'll save that we'll come in let's see if I can that's not what I wanted to do okay um so if I go back to my definitions we're actually just going to do this really quick again so we're going to I'm just calling it the same thing we're going to delete everything from here and we are going to get the count of active problems for each assignment group now it actually knew um it actually knew that group was assignment group that was default if I didn't want to assment a group I wanted something else that happened to be called groups I'd want to spell that out uh one of the things that I really like about now assist is that it's trained on data and it knows what group is no matter how bad my spelling is or not no I I can spell things badly poorly enough that it doesn't know but in this case it knew what I was doing um so I'll click that we're going to accept it here and we're going to ga. Group by I'm going put assignment group in um and actually in the the account we don't need assignment group here so I'm just going to remove that okay and we will put the table name in whoops group problem counts so I selected my table this is the script for the table we're going to save it and if I go back oh and active problems assignment group active assign active problems assignment group that looks good so let us let's go here and see what we get okay so it these are the active problems we have a group called problem solving got to love test data um as we come through it's it's not pulling the active problems correctly uh and if we take a quick look at why that is count count assignment group if I do number well I want to our in so I have something that's wrong there but we're not going to we're not spend time debugging it um but again it it was able to generate what was going on it does it knows about add row and puts it in through here gives me really close to where I want to get without having to memorize the Glide Aggregate apis and knowing at Aggregate and get aggregate that's right but we did have to work we would have to work through it a little bit okay um we're going to move on we're going to do the dynamic filter options field name for problem count is wrong that's where I did it wrong problem count act you're right so I generated The Prompt differently and it just it's it's a bit alive right it even changing something that seems meaningless as it goes through the model it suggests it sees something different and it generates it differently so we'll go ahead and do active problems instead which is what we called it the first time we'll come back in here there we go right so pretty quick couple lines and now I have this so we're think about our use cases it uh it can help us out there and just generate that code get it quick you notice I didn't have to look look up any documentation what's going on it's right here if I had just read the field names we would have been we would have been all set okay so now we're going to move to Dynamic filter options um and let's pull up the first thing we're going to do for a dynamic filter option is write a script include so we're going to go to script includes and I'm actually going to change to the global scope so we'll pull up our script includes under system definition and we'll click on new and again we have a whole session on this but we're going to focus in on the scripting part of this so we're going to do reporting uh utils not a particularly a great name but we'll go with that um default is only available in this scope in this application scope that should be fine for Global for Scopes that may not be good I actually would recommend we do this in a scope so it's uh all my stuff goes together it makes my admins a little bit easier when I can go hey this is what we're doing I'm GNA make this available to all application Scopes if I'm doing reporting utils that's a certainly security session SE setting you want to think about but I'm going to do a pretty common thing here so we're GNA go with that it's going to be active very very important check uh client callable gotta check client callable um Dynamic filter options are being C called by the client so it's important to have that in here so this automatically already generates this but now we need to have some functions so what do we what do we think how about um uh I want to um get all CIS with an active problem again I'm GNA press I'm going to press control enter to kick this off immediately and that looks good so so I'm just going to accept it so I want to do a Glide record on cmdb where the oh you know what I don't want to do this with an active problem this actually is fine it's okay let's go with this so we are um running the join query which I don't use I don't know that we actually need it but that's I think it's correct still of active is true and you'll see sometimes it does active is true sometimes it does ACT has active query doesn't really matter um Al They had active query might only work on task I'm not I'm not sure but this will work then here's what's really key for for dynamic filter options and it often in script includes we're not going to return a record set we're going to return a an array super important that we're going to return array of CIS IDs it got all that right in this case it doesn't even know that it is going to be used as a dynamic filter option but that's what's really common in a script including so that's what it's going to do so that actually should be fine um one thing to note sometimes it repeat the end of this uh to come through so I'm actually just going to remove the oops I'm just going to remove this duplicate code um and the syntax editor does uh does highlight that for me so we're going to remove that um let's see if we can do another one in here we're going to do um get all incidents for Vi VIP users okay okay we're on a Glide record want incident color and it looks good I'll take it um yeah that looks fine I I just think it's right now this is one that's interesting because if I was actually going to do this if I'm reporting on incident uh actually we don't want to do that um well if I was reporting on incident I could just do my dot walk but this still might be something where it makes it easy to do and particularly if I need to do something else with this data that's kind of restrictions of dynamic filter options um so we have these I'm going to go ahead and save it okay uh who needs to have this we're just going to do SMC internal hope I have that on here I don't that's a new security setting in Vancouver I think I don't actually remember being that's that for um actually and while we're on here I'm going to make one more call out so when now assist is available for you you're going to see these little dots little stars stars powered by now assist it should be available in any script editor that you see um any particularly anything where you see the the new browser over here there are some fields that have JavaScript in them or XML but they're not actually script Fields they won't have this uh this is looking for a dictionary option that says script um and that's in there uh to run um it is Li now assist is licensed per user you have to have a specific role which is now. assist. Creator um you have to have that role for this to be enabled so if some user does not have this it's because you don't have the role it's not installed or you don't have the role but if I see it and you don't it's because you don't have the role um okay so we have that in here we've saved this so let's go back to the filter option to finish this off so we're going to do CIS with active problems I hope there are some otherwise this is going to not work particularly well we're going to go to uh Dynamic filter options in my Dynamic filter option we're going to come in really quickly to Define this um and this is uh CIS with active problems I actually like be pretty verose in this Sor right not is me me is very descriptive but in this case this is what we're getting uh the script uh the script to call this is is new report utils I'm going to go back and copy that um here's it so this is Javascript the script is a JavaScript this field is actually not defined as a script um so I have to type it in I don't have code assist in here for that um and in this script is pretty limited on what it can do with security sandboxing so there's probably some reasons for that but right now we have that I'm going to go back because I never trust my typing and copy that uh that's oh yeah reporting utils so cop and past copy and paste as your friend so reporting utils um and we're going to call the method that should be good the field type actually I think this is a uh have CIS ID CIS ID it's available for a filter this can also be used as a default value or reference qualifier really really powerful for reporting we're focusing on filters the reference table for this now where do we want this table to show up I am getting a list of CI so anything with the CI will work here um where I am going to put this in is uh incidence a feeling I'm not going to get any data here but let's go with that uh the roles so this is going to be available to everybody but you can specify this is only available to this Ro or not that role I don't have to have too many options for things that don't matter um incident oh not incident it's what this is CI so I think I need cmdb that's right configure configuration item there we go so any place I'm referencing CM dbci I should be able to do this whether it's an incident it's a problem it's security problem every place I'm referencing uh a CI I can do this so we'll save it and now we're going to go to incident and I'm going to wrap up real quick uh so if we go to incidents so now if I go into my filters I can do um configuration item is dynamic and now I have CIS with active problems super simple super efficient um and it's going to pull back in here this is one of the difference when you define this it's actually showing the user which CIS have have problems what it's doing for but if I come in into this again just CIS with active problems really really awesome really really powerful and we saw how quickly we created these again so really useful we really want to get that okay um with that I am gonna end My Demo because I am out of time and we'll I don't think we have many questions that are in here yeah we yeah we have a couple just uh one um when this is installed when you have a license in it and is on your uh platform is it scope specific or it be there for everything it'll be for everything it's platform yeah to come through uh yeah once it's turned on once it's turned on on the instance it is uh once it's turned on on the instance and you have the role you'll see it it does require the role to have it okay and then the other thing is uh is this available on pdis it is not available on pdis uh great great question thanks for asking that um right now the none of now assist is available on pdis okay great if if you need uh for all the now assist stuff you want to talk to your account team about um what we can do to get you some hands on or what goes through that um but not available in pdis we will be doing knowledge I hope all of us are coming to knowledge only seven months away it be feel like tomorrow for for those of us who are preparing for it uh we are looking we're looking to have stuff in now learning and then a knowledge will certainly be doing a lot more stuff to get your hands on okay great and um because it has to do with it Tara real quickly wanted to share some information about how customers can get involved in this yeah sorry I don't have a slide I just it just came to me while Adam was presenting but most of you know me I'm Tara Fischer outbound product manager for platform foundations and analytics and I am interested in working with any customers who want to be part of the geni Omniverse do have documentation and collateral I'm happy to share with you so if you are interested you want to help be become part of that process help us train our data be um part of all that get some one-on-one um experience with us uh please reach out to me directly I would be happy to go over everything with you and see if you would be a great fit thank you okay awesome and we are at the top of the hour so I'm G gonna go ahead and close up Adam thank you uh awesome session as usual with everything that you usually present so really grateful for that and um I know people are going to get a lot out of it this recording will be out like I said later on this afternoon or early tomorrow morning uh one other thing I want to make sure that I share real quick is uh Vancouver is out there uh so this actually talks about with the release coming Vancouver is out there there still are a couple other sessions uh from Sister organizations that are going to be showing that I think there's one on the 18th and one on the 24th so this uh slide is still relevant for that and then also uh in two weeks now we're actually going to do a session where we're going to show you how you can move analytics content from coreui over to the next experience so you definitely want to be present for that one as well and as usual thank you Adam thank you Tara thank you Dan for being available and then thank you to everyone that has came and we'll see everybody in two weeks thank you
https://www.youtube.com/watch?v=XFpz4izCilo