logo

NJP

Episode 27 - New Flow functionalities in ServiceNow Orlando release

Import · Feb 02, 2020 · video

hi everyone and welcome to the witch doctor sky to service now episode number 27 and today we're looking at the new functionalities in Orlando release which you can upgrade your personal developer instances if you haven't done that so there is a lot to cover and today we're going to look at the flow and what I would call general flow functionalities I don't know what to call it but new stuff that you can use pretty much wherever in which flow you are building so let's continue quickly through PowerPoint Who am I my name is Cora Lundqvist a k2 witch doctor hopefully you have seen this presentation before in my videos or not hopefully it would go to Mara videos and enjoy them as well working at service now as a senior developer application developer being a customer service now being a partner or been working for a partner to serve now now I joined the mothership and working in certs now as well not the community trying to help out as much as times allow me and also can see that the bullet points are actually how to date I'm a ServiceNow community MP for 2020 as well if you like to reach out and get connected you have my connections on any site I don't remember that all that well but you have LinkedIn Twitter subscribe to YouTube channel of course you get the new videos directly thank you top of course if I make code in the videos that are bigger chunk I will put them in with github repositories you can just copy paste them from there and for almost not almost a year ago I released my book to witch doctors guide service now sadly or well time flies it's what was for Madrid so the new stuff in New York and Orlando isn't there but there are a lot of basic stuff that is good dose you don't do the same mistakes I did I haven't read it go to the Amazon and see what you think about it but anyway enough about that what we're gonna do today we're going to look at five stuff change fields what they are is the lane trigger another field is kind of wrong another choice on when to run I'm going to look at something called anomeric it flows and then the transform functionality on the data pills so let's jump in there and let me just and suddenly I had some issues earlier or not sadly perhaps but that makes this I think third video I'm making right now because I had some intervention by my kids and then I just clicked wrong stuff and yeah there's a lot of things don't know why so four times the charm so let's hope I don't have to read you this video again so changed fields what are they let's create a new flow shame you risk ellipse 0.7 shame field problem oops if I can spell there we go just make sure we can't have issues as possible so change fields will pop up when you select record create it updated and of course crazy or updated so let's think this one we want to do it on the problem field and as you can see on the right we now have changed fields which is a complex object an array of objects and each object has five fields they have the feeling remember is to feel name not the label of the field and wait the previous value of that field and the current value and of course the previous and current display value what nothing is that all of these are string fields so if you're pointing to the reference field the value is the CCD display value is the main because that's the only way you can pretty much do it right now if you have different types of field so you will get an array of objects for each object is the one of the females that active were changed and we might test it multiple times so let's just hit this one so how do we do it what we need to do is loop through the fields above changed so we do a for each pulling the change field all right then let's do a if statement let's take a look and I'm just gonna do I I hate this example spot that you draw best pass score so that means that if and the previous fella has have that I'm saying that's how you'll know what that means so if the previous value the in short description contains gora then I want to do something and of course not only the value I want to make sure we only look in the short description so the field name is this so if sets go around in description I don't want that to happen so if that let's create a task problem I'll just together so the problem field should be that form yeah that's that's enough now you can of course go out change a problem record seeing a triggers and all that but with the change fields are some new cool functionality on the test let me say just be certain that it's working on the test on a select which record I'll do that for and now we have changed fields so here I can actually build that array myself since a short description previous value was let's trigger this times the trees well this is a test and if you don't want you don't need to fill out all the fields they will just have null as a value if I won't have multiple fields I host hit plus and then scroll down and let's say that the description field was changed and I'll just do like this now there we go and then I'll hit run so now it's running the flow and those two fields were triggered and how did that work so let's take a look for each here you can see this is a test you can see these are the two stuff I actually put in you can see the problem and now I'm actually I think running into the same bad yeah I do wonder why so as you can see you don't have a runtime value so it doesn't really fetch the values I have which is kind of weird and I guess this is with early access and trying to evaluate her I wonder what that happened because the the funny part was I actually tested his just the fourth video and then it worked so why doesn't it work now let's try it again and if it doesn't work now I'm actually going to move ahead because this is how it's supposed to work and if it's a bag it will of course get fixed so let's just I just take something this problem here so you can see her isn't that the problem tasks on this one and the problem too short description doesn't have go ahead so right now when I hit save we should see it being triggered let's go to flow today's executions now you can see that I have multiple I actually thought that I had deleted my old one but that's good perhaps because the old one actually worked let's see so this you can see here's the current value of course it's valid my default let's go back to my problem because now we have a problem with go run and let's see what happens now I have two flows one I know worked earlier see go around let's go back to the crazy today must be these two this is the one I just created let's take a look at that one you can see the runtime values in this one is still empty where let's go and take a look at the other one this one doesn't in for time huh why is the wrong time values thoughts I'm just trying to figure out why the actually behaves like this it published its in the global scope so just stop a dip before let's see so feel name is let's just do your hat we change something a short description saved after it so now it doesn't even care what the previous value worked let's see if this works now you get some troubleshooting that as well what's nice so we keep the problem I'll just build in some things we get that to change I'll just change the description field as well so you can see if you have multiple fields have changed it's saved let's scroll down for the following let's see if we get look not working hmmm I guess I need to have to ask around for this one to understand why it behaves like this anyway let's take a look at the flow so we know that it was probably this take executions this is the one who did and here you can see now suddenly we have what I was looking forward to runtime values that's why it didn't work hmm and here you can see that of course we could use the previous values you can see it or filled in I'm not going to stick around freeze anymore but it will be really nice to have and this channel gets my questions when I start doing all the other flow stuff as well to see if we run into more issues than this let me just take a look at my sheet page to see if I missed something about this change fields no next up is the flow or the SLA flow and what we want to do is pretty much if you have been working as a lace you can know that you build them true and work for us order now you will actually have a flow field as well if you're running on a new instance new Orlando you will see both fields but you can only use one of them but if you have done like I have done here and hold on if you operate Orlando you will see both if it's a new world I know you only see a flow field on the form work flow is still there in the backend but it looks like this now so that's the lay let's take a look at the out-of-the-box one what's the what's the big different stuff well of course you can do all the cool stuff that they can do to flow as well and the biggest thing I think would actually be that we look at the tent timers and the old work flow you will have you wanted to have a trigger at 50% of time and at 75% of time that got kind of confused because you set the first time or 250 then next time when you needed to set to 25 because together they become 75 here you actually put them at the values they should be from the start so that's that's the big thing if you look at it you can see this is how it looks the action is named as labor centers timer you just put 50% and then if it's completed that means that this one is completed it in reached that time we want to do this damn why it's way to the heat 25 and that's completely want to do that and wait for it breached then we can do these things and how does it look if you do it so what I have done and I think I changed it yeah I changed a set started to open so I'm sure being able to show you how it looks like so let's go to incident let's create a new insult and I would like to show you how it looks like you we should have skipped the 50% but we would like to try to trigger the 70 file while we're actually doing this so I'll put your heel or make it a prior to 1 and I go back in time so if I still like that Trish and I just hit tests or something it's safe so we don't miss it now if I scroll down you can see we have perfect 60 minutes so and it's running let's see shall flow so you can see that this one is complete this one is skipped because when it was triggered that time has already went by so that one is skipped and now you can see we're waiting here then you can also see this is when is expected to active run out so in about a minute this one should triggered and be completed and you can see it's now waiting and let's I just have to wait a little bit more what's more to say about this one not much let's just wait I'll come back to that in a few main we can take a look at a small thing meanwhile and it would go back to flow let's take a look at my flow if you remember I said we have a new value on the run trigger and it's for for every update it hasn't been there before so we have basing out four different triggers we have ones mean that run one time for this record then Nevermore then we have for each unique change that's what is kind of tricky because that means that if you have a innocent for example that goes from in progress on hold it will trigger but if it goes back from on hold in progress it won't trigger because it has already been once in in progress so that means that you have to know what you're doing when if you choose this and understand it I had also some four words about this and I haven't looked it out but I wonder if this one who worked so good if you don't have all it on the table because then you don't have to history to know what values has been or not then of course we have only if not current to running that between pretty much means every time unless there is a active flow already this flow active context of this flow running against the record for example as a lace don't want a new one trigger every time you might have something waiting for a rest call or something you don't want to read trigger it until that's done but if you want exact every time the condition on treatment meets I want it to trigger doesn't care if they're already one from running active or not then it's every update you should choose this is the new one and there was really good explanation new talks as well for these run triggers so if you don't really get what I'm talking about go to the dogs and find out so let's go back to the inside and see that one looks like where is my incident I just brought not the instant one makes so much sense 12 minutes so we're past and if I go to the flow we can see now it says waiting I'll refresh completed and now you can see it has actually created an event for that and now it's down waiting it will be breached and if you look at the timer you can see that it says completed as well which is kind of nice so that was the SLA flow that you can already SLA that you can use floats for desolation nowadays we looked at the running trigger and now we have two other things I'm just trying to figure out which one will do first let's do transform functions that is a really really nice functionality earlier you might have done a lot of custom action just to do small things to change stuff on the different values that you get back from the data pills now we have something called transform function so let's reuse this one for example let's say that on the task I created I would like to add some cool stuff on that short description we have for example that just to show you the date field let's see if I the created film now we all know the for that one let's say we want to tweak that one and that is where this icon comes that's the transform function you can click on that one scroll now and I have to suggested functions they look at what type the data police in give you some suggestions and of course you can drill down to the other difference and you can see there's a lot so I won't go through all of them but for example I can select date string and I will say that this date field I would like it to be like I'm trying to point at the screen I didn't go well one day month they like this instead of having something like this then I just need to click on that or enter a custom form and apply now let's trigger this one just to make sure that it happens and just to avoid any issues with the runtime I'm just going to do like this I'm gonna put that on the top create the task to do to that done it's safe and for that there we can just test it and I can get us to find a problem I hope this is an open problem because otherwise I don't think I'm great tasks yeah I could do that so let's look at the task you can see the short description put in Tuesday September 9 2007 which is really really nice and to make it even more advanced I just need to do it I need to go to the problem to make sure what the problem has a support description ah you can see the short description is there are six different words in the short description so let's say that I only want to have the first word in that description for a second let's go for the second word so let's go to the great toast again now we can see that I applied transforms is this one we can remove that so in your Scrolls you can see let's go to string so we want to have a second word so that means that we will make the string and split it by whitespace and in ternary and then pull the second element so let's just hit split separator it's a white space your seat Thanks then the next time one thing do we would like to go and find get item from array so now that's the next step so that means that we would like to have since index thoughts on zero we will like have number one apply now we can see that the first two are split then I do a get item from that array there we go it's safe and if you look at this one just to make sure we used zero two and the second word is floor so that's the word we should find on the short description of the new toast so that is test number two and here we go I look at the task then I realized I forgot something oh here I can see this was the issue I tried to split a date field what did work that's when you get too fast so let's remove that it was of course the problems short description that we wanted where is it so how it was called short descriptions was no problem statement and we do it all again we would like to split my wait nice apply and then we want to have get item from that one and we want no one apply it's safe now hopefully we would get the better one we'll do a test serie to run tests look at the flow and look at the task and now we can see yes we have the second word floor which is really nice and when you look at the runtime you can see that as well good to know how is that when you do multiples and transformation functions you will only see the last value you can't see the whole flow what you can't see the whole area for example I can only see that there the result was floor right now we can't create our own custom transform functions and right now if you would like to do that the only way to do that is basically to hit the in line and scripting instead but I'll bet it will show up in a release with you and so that was it about transport flows or function transport functions last thing up is what's called dynamic flows now what are they and luckily I actually got them done so it won't take too long let's just skip all these so dynamic flows what are they used for they're pretty much used for when you build your flow perhaps you don't really know which sub flow you're going to choose or me that might be something that will be evaluated and decided when your flow is actually running it makes it a lot easier to administrate your flows because in this way you don't need to actually edit your parent flow to add another sub flow you can have it dynamically instead I'm just coming trying to read out and of course another thing is that the dynamic flows actually run in his own context and not as sap flows that there are actually baked into that the parents flows context when it's actually building a plan so how does it look what do we do do we dare to actually create it on your own let's take a look first so and this is yeah this is the river so let's do it from scratch instead just to give you a sense how it works so dynamic flows or cell flows that's the two things we're going to talk about so in my case I am going to make our record let's just just create a new table that's going to episode 27 studio and like all my other use cases this one will be weird but we have the table tickets I just create a table called tickets and in tickets I have ticket time now in this case depending on the ticket type is either for example the incident or problem I would like to have different sub flows running so that means that I'm basically first that screwed up and let's go up here to flow episode dynamic flows I'll just do like this so when I ticket is created that's wrong so we're not worth being created depending on what's in that ticket type field I would like to do different things to do that I need to do first something couple of template so what I do is I create a new subfloor or call it template episode 24 more ticket you can actually call whenever we want this template is only being used to define what inputs and outputs 200 I Namek floats will have I'll just add everything so I'll just have one thing and that will be my case I'll just call it type the VSP string and the output will act just be unknown incident or problem number perhaps that will all just be a string this is basically the only thing I need to do in this template so I'll hit safe one thing I just need to check this just to second yeah I actually need to do this I wonder I don't know if this is a part or something but would it something they would have fixed until next time brother need to put something in actions to be able to publish it and I need to bear it have it published for it to show up here so I'll select my template and now I can see that the type showed up here yeah now I need to sign which flow and I'm going to run you can of course hard code either I think it's the Sicily or the name of the flow so I could actually just feeling the flow I know Quran super flow or I can have the dynamic version where I don't really know which am I going to do so I'll just call it EP 27 - and here I actually would like to have the tickets time the value that's in that so I'm trying to call I draw a flow for example called EP 27 - in sundry bits and 7 - problem and so on and by doing this means that if I in the future would like to add another dynamic flow I don't need to edit this flow as a new sub flow I can just do it and he will find it by the name I also have a wait for completion meaning that it won't go further down until it actually has a completed and of course the input must types I need to put that one in here as well because that was an input to myself flows now what I can do of course I can just go up here copy so flow and I just changed name to EP 27 incident copy so in this case if the value in the incident type is instant I want this top row to run and then I'll just I'll just do a lookup and I know that we're looking for incidence of your instant table get me the first active incident and then since it's a sell flow I want to assign that number for that record to that outfit so I'll just do like this and that number should be the lookup records number there we go only save and I'll hit publish and then for make it easy for myself I'll just do copy again and now we are still problems with a BP you remember copy and then of course instead of looking up insolence I want to look up problems look a problem for actin is true there stood the self law truth number plum record with right as well it's save and we'll hit publish so now I made two sub flows deep autonomy - insolent and - problem the dynamic flow says find the flow did I have a point yeah i spaced yeah looks good now we would like to do something with the output we get then we actually need to use another one to get flow purpose and for that one I'll just go to the context I'm gonna also drag that one over there and we all know that the templates reducing lost that one now we have the number and we can reuse that further down in your flow and I can just go and just do I'll just do alone the number of the beast there we go I'll hit safe well he hit activate and now it should be fun to see if this actually works so let's go to ListView hit a new ticket I'll type in insulin one of is case-sensitive oh don't dare to hit save and I'll go to the flow designer we have the execution and cute in progress waiting one over the plentiful [Music] complete okay let's see what happens it was created you can see that we have a dynamic here you can see that the floor which you start was that any routine data you can find that it output there was it you can see that the number that we get back was number 15 and the Lord was correct as well to make certain I'm not fooling around because it's this one too easy almost let's hit problem and it's submit now instead we would have a problem being created executions waitingwaiting the real completed you can see that it longs to problem and in Lord we got the problem number instead so this is a really cool functionality because this mean I can publish this one and then when I want to had changed I just create a new change sub flow with the correct naming from the correct template and that will work directly as well so dynamic flows is a really really cool feature that I really like so I think that was it for today we have gone through let's go back and take a look at my sheet page and we take a look at them the change fields the previous values and all that stuff the SLA flows and the run us that you can now select every update we have the transform functionality where you're on the data pills complete and like convert the string to an array and with split and there were so much more that you can't do so look into that when you're doing stuff especially when you're thinking I need to create the custom action for this take a look at transfer field first and then we had an item flows that actually worked directly we have to Sean and I'll come back and take a look why my change fields wrong time values weren't frame with me today but thank y'all for watching and have a great Sunday if you're watching this almost live otherwise a great week

View original source

https://www.youtube.com/watch?v=CKznJyAOJF0