Creating a workspace for a custom app - Live Coding Happy Hour for 2020-06-18
[Music] hello and welcome to live code happy hour for June 18th 2020 I'm here today with my coworker Brad who will introduce himself now good morning everybody my name is Brad Tilton I'm a developer advocate with the developer program here at ServiceNow I have been with ServiceNow for a little under four years I've been in the ServiceNow space doing development work for about the last 12 all right Thank You Brad I'm Andrew Barnes developer advocate at ServiceNow as well and I've been on the platform for over five years now at ServiceNow for coming up on two years in this role and focus on custom integrations development at scale so managing development teams and their work efforts and custom applications hmm I've left out my ordering they're through me all off and for us so we're at this special time too because we wanted to move the show off of the 19th and so we're we're here super early for us and our beverages of choice are likely going to be water what is your beverage of choice is fine wanting star do you have some coffee or something oh I have some coffee out of my service now my old service now Oh some some locally roasted coffee it's the same stuff that I drink every morning for the past 3 years so I have some fine water in a Great Lakes brewing but because I don't drink coffee oh goodness so today we don't have so sometimes this show is particularly in-depth we're doing integrations you know so the barrier entry is sometimes rather high today we're gonna keep that barrier for entry lower so bread I know we're gonna work on creating a work space for our custom app can you give us a little bit more detail about what we're trying to do and why we're trying to do it yeah so we have we have an app that we call artefact manager where we manage basically all of our content for the developer program and then you know our extended developer program team so anytime we're gonna post a blog or a youtube video or do a live code even some events we put them into artifact manager and it helps us you know manage our artifacts and you know when we're going to publish things there's some automation that happens where we automatically push things to YouTube and we automatically create things for our blog and we've actually done some of that on previous shows but what we want to do today is we thought it might be a good idea to create a works pack the workspace for our artifact manager because we do you know we have a lot of different artifacts and different types of artifacts and it would be nice to have a UI where we can manage those a little better and have you know more than one opened at a time and using the tabbing and we think I think it'll make our experience a little better and then also we just wanted to get into work space a little more and you know not being someone who is actively using ITSM or CSM or setting that up for people and you know we don't have as much exposure to workspaces as you know somebody like that might so we wanted to to take a shot at getting it set up for our app and then doing some configuration you know based on how long it takes us to get it set up initially yeah and then that opens up the addition and inclusion of components that we can so since the only things we build on this show are things that will you know are real for us so we only do real use cases for us we don't we don't create fake scenarios and then try and solve them so adding workspace in will add a place for us to have a demand for us for building components you know those custom components so so that'll really you know open up that area for us to be more flexible in in bringing components into our instance and leveraging them and having that demand gen for them so that so that we're inspired to actually build them because I like to be inspired by real use cases not not abstractions when when we're building on the show here so that sounds great let's drop into it all right I will go ahead and share my screen here I think you have to let me share my screen I shall do so thin sir there you are Oh that'll do it all right notifications are off all right so what we're looking at here is the is the dock site which if I'm going to do something this is usually where I start if I'm not sure how to do that thing we you know we need to create a new workspace for our app and it looks like the way that we're going to need to do that is through guided app creator so what we'll do is we'll create a new app through guided app creator and that app will basically be a äúi layer for our artifact manager app so before we get into that let's take a look at artifact manager I think this should be okay so in to point out we did have and do have some dashboards for artifact manager and this is just taking those that idea of dashboarding to that next level right so so dashboards are a good jumping-off point but they're not a good working from part where's the workspace is designed to be the place you work yeah that's a great point so you know we can visualize this data so I think we have a good dashboard content dashboard that's called dashboard of course so we have a good content dashboard where we do have a lot of data kind of in one spot here which is nice but it still doesn't let me you know if I want to jump into some of these blog posts or live streams you know it doesn't really let me do that and I can click in here and then click through them we also have have you know some issues with we schedule things and then they fall off or we have duplicates and it's you know sometimes hard to hard to figure out which one the duplicate is I think that can be managed a little better so let's go ahead and you have anything else you want to say about artifact manager no all right let's go ahead and create a new ad so we're gonna set up our new app are we gonna have we're gonna have our fun scope name I think what fun scope name it's Brad [Laughter] what's the best scope name and since I am just incredibly creative we're gonna call this artifact manager workspace it doesn't really need a description at that point that's right what's our scope name for artifact manager it is artifact MGR yeah why don't you do like rd and then underscore workspace or something like that that'll work so close let's go yeah hey nice workspace there we go all right I'm not gonna give it a logo although we could okay so so there are some artifact manager roles but I don't know that we need to leverage them here yeah do we have to give it a role all right so we'll give it a workspace we're thinking which data tables do you want to use all the data tables probably so probably gonna be some artifact yeah all right so I think we definitely want to use the artifact table yeah that that seems seem to use for is another table that we might know what else do we need do you want to hmm we don't grab that here but and so we can add tables later yeah I think what we want to do is possibly include our meetup tables as well which I'm not sure are correctly in this instance but they're going to be okay yeah yeah so the nice one hide those later yeah the nice thing about adding tables here is I believe it's going to create us some stuff in the workspace automatically for these tables that we add yeah I like the meetup idea see if they're in there right I'm not sure if they are or not but I think we load to do I don't think that apps called meetup it's something else meetup see my back space too many times here and got rid of get signed in our artifact table so again not a not a huge deal we can add tables later and no it is not loaded so all right I'm gonna say we're done with those tables okay and now we actually start configuring the workspace itself so all that previous stuff was configuring the application you have the scoped applications information all right so we can change excuse me we can change the URL for our workspace I'm gonna change it because I don't like that yeah I'm gonna make it completely on board with that match our scope or we could go over just say artifact artifact artifact is even better yeah rolls sure do we have an artifact manager well and this is one of those cases where you do have to choose the role like it won't let you proceed without using we were also its current user they use a role that seems fine yeah so until we picked a roll back that continua that's right was obscured check pointed out a type of oh he's not he's not live with us but he's still but he's still here doing his best in here to keep our typos down I love it thanks doc all right let's continue why does the tabbed one looked like it only has a single page but the single page one looks like it has tabs yeah so let's let's look at all I want yes but the yes but the image seems to be a little misleading I think these are breadcrumbs okay cuz cuz from your resolution that I'm seeing the map from your screen they kinda look like those are other tabs yeah there's this little little caret here yeah I can't see that here yeah we definitely want the I want this one that image really could benefit from having some tabs on it though yes I think this is the one where if I if I start clicking on multiple things it's going to basically is it gonna give me kind of tabs of those but give me my breadcrumbs so I I know where my context is I think is that's what it's telling me here yeah I don't want single page I want to have very good now choose our utilities oh so these are the utilities across the top so user preferences notification search I think we probably want all these I'm I'm down with it I don't think there's a compelling reason why not and I think we get to choose the stuff on the left yes I we have home and let our list switch sure here's where you can add in more tables so this is this is what the that tables thing does is it adds tables here so that picker earlier dropped things here so you can add more of them here this is also configurable afterwards so some things in guided app creator are only configurable during guided upgrader and some things are configurable later as well and the lists that are available in your list is configurable later I don't know that we need inbox because we're not really doing interactions or anything like that so I don't know what the inbox is true what let's see incoming work items such as chats cases and incidents yeah we're we're not going to be we do have our artifacts or assigned to people but I don't think normally you are assigning something to yourself like I'm not going to assign Andrew a blog so I don't think we need that nice and Petiot asked you know interactions for custom apps you can definitely have interactions for custom apps in our case we're not doing so our artifacts aren't interactions and so it doesn't make sense for our use case because they're they're their records for us to manage things that we build and create and deploy like these live streams each of these is an artifact each blog we write is an artifact things like that but there's no interaction between us and a customer for those use cases so the interaction table isn't isn't helpful for that for us yeah shall we open the workspace let's open the workspace we're going to so this is maybe because it allows you to look at the workspace before you've exited guided app creator which is which is really nice it's thinking about it we're loading our instance hadn't had his coffee yet yeah it's not used to us you know given at a hard time this early in the morning all right so this is our landing page which at some point will have some custom components on it I am sure this is one of the places that you can put custom components if you have built them so let's look at our lists and it went ahead and gave us a default list here for all of our artifacts which we're definitely going to adjust yes and then we have my lists so yeah this is basically all we have at this point because this is the only table we told it one of the nice things is if you create a workspace and include a table that's extended from tasks it'll actually give you a number of workspace modules here based on the state field on tasks but ours is not ours is not alright so while we do need to add some more lists I am certain that we can configure that later but we could go in back into the workspace configuration and start adding those now if we wanted but I think I think we're done with guided F grader this this really is what I wanted we're gonna go here this lets say crowd goes wild and since we didn't do anything else then that completes the creation of that scoped application which was really just to create us this workspace so now we need to add in certainly our classes of artifacts and then some state things as well to help us manage that you know let's look back at artifact manager in the platform view and we can kind of see what we have here so we're not going to add all of these modules on the show but probably at least add a couple and that is your favorite idli which is a good thing to start from because you yeah you know we have ones that are for everybody but your favorited ones are clearly ones that you care about more and so those are the ones that we're gonna want to add to our workspace first yes and I think I just favorited the entire application so well most of us that's just cheating them there are all my favorites they're all my favorites like my kids like your kids that's what we tell them right so we've got categories all right so let's how do we think we so I believe that you go to workspace configuration administration or is it in workspace yeah it's under workspace here and then it's about in a specific workspace maybe there's something I have one we could look at the docks but where's the yeah that's that's not that's not ha here it is workspace lists look at that is what we are looking so let's look at the existing list and then we can do an insert and stay I hope all right so we've got our name ordering these things are familiar category what do we think category by effects so it would be that top yeah like right there and would you mind giving us one zoom in I can give us a man screen now that now that we're actually looking at some detail of things so yeah the categories are kind of like application menus mm-hmm and then and then the records are the modules are the rough equivalents right yeah so do we so we've got well one we're definitely going to be like trim and trim in that down because because we don't need all columns yeah so let's go I'm gonna make so we can you want to edit this column thing or you yeah I want to find what columns we're using right now so let's come in here and reset my columns that's a lot I in fact would have not reset your column which ones you cared about well I probably have added some random stuff when I was troubleshooting something yeah I actually let's let's just do it from yeah let's just do it from the list cuz that's that's not a great number of columns either so all works very well and they seem to be doubled up too which was which is very ugly so we've got our artifact manager workspace then let's click in here Tommy does remind us in chat that we're going to have to create a view for our table for workspace which i think is accurate I thought were you I thought I created it for you good suppose to records it's supposed to work space thank you any workspace tab yeah I think we're gonna get a little message yeah no no did it create one for us well that looks bright so it used to give you what was that little message that one way it used to give you a message saying there's no workspace for you and you had to go in and create one but we'll let's stick with a list and we'll get to that yep when we get to it yep all right so right now we have all of our columns so so let's start from scratch yeah so I want the one title right title title assigned to the abstract the description and the state about the class absolutely the class it's gonna be needed and usually after that I get into things like the planned publish date and the publish date uh yet I think those are good we want to stay away from specific stuff probably on this all and that's about it the draft or published URLs are occasionally useful to just see whether or not they're there or not but I care more about those when I'm in a particular class yeah that's a good point if I'm looking at a blog or a live stream I want to know what the YouTube URL is yeah all right I think this all looks good so can you change the orderings though cuz that didn't put them in the order that I wanted them so I think class goes to the top sign - can you cut this date next to the assigned to and then that seems fun I usually can't tell until I look at it yeah we look at terrible and then then you know we make adjustments we're agile over here iterative all right what's deliverance guy look at it deliver it look at it do we want type instead of glass oh yes clearly apparently we want that's right because these are all the same table we just have a type field on the table that denotes what kind of artifact it is it says pseudo kind of classic all right and if I use the list refresh do we get new columns I wouldn't have expected it type there we go nice and then I want to order this because this doesn't look like a great order what do you want to order them by I think plan and publish listing all right I'm done with that no all right we're doing all this and I'm gonna laugh because the number of times I actually ever click the all is that me - I don't ever click all cuz they only make sense in their groupings of types what's another one that we don't click on let's do that so let's do let's add one for blog posts absent in I think we can probably be done with lists yep so I'm not gonna hear any interesting there will be if there's not now now that is the that's the most developer answer there will be one well we will divert and make one right now if there isn't so I had set all that a thousand outs and I wanted to show up later so we're gonna do a hundred we have our same our same columns here we want to add yeah let's add so type is blog host and then quartering is right the things we need differently for blog post is I like to see the the use for blog posts it's a good idea and what else do I need for blog posts the published Earl and the draft Earl yeah and typically I'll want to look at one of the well I'm gonna leave them off until we actually start using them again I used to use the the two prioritization fields we have but I've not been using them so let's leave them off mmm I just want to know what what those were there for so I'm not gonna hit the Update button cuz I almost just did I usually if I spend about more than maybe 45 seconds on the forum here's the probability of me updating the record goes way up way up in insert and stave or just insert is fine yeah there we go thank you yeah my way around that is when I'm doing an insert and stay because I changed the name an insert and stay right then and then finish because you know otherwise like you said my hand goes and it hits you know save because I get nervous so we're not using draft URL for long is that one well so we're about to turn on automation to create those is that we're putting this look I think we have a Oh are we putting this slug but anyway if you go to view to the end that's where I want pew I'm gonna get rid of draft URL okay it was can add right now I'm gonna update and you can drop type oh that's right we are already in only blog posts so that's a good rule of thumb anytime something in your one of the columns in your list is always going to be the same you probably don't need it in your list blog posts oh I have to refresh so title stained abstract where's description I removed it Oh cuz our list is already so long alright the list is kind of long there's a lot of columns hmm how do we make that better then because actually for blog posts we only need one of them its YouTube videos though that I need description yeah and one of the one of the nice things about workspace is it is a little easier to click into things because I can just click on it it comes up to the tab and I can come back here I don't need as much on the list I feel like that's it that's a really good point what so without scrolling is this what I want when I'm here it's the question I like to ask so I like to have a few extra columns for when I need them but I want to know do I have everything I need without the scrolling like is this my priority list of things that I'm seeing so the I don't need to see the published Earl because I've got a published state when I'm when I'm checking to make sure that all of the published ones have published URLs and all the ones with purple sterols have the published state I want to see those two things at the same time but I can I can slide over for that use cast the default use case is I need to see the plan publish date and the state for sure the title that yet I like this this seems to be the ones that we actually care about and again this is iterative so as we're using this will go oh I I want to adjust this one alright so we probably now want to I think we may want to look at the form well there's our there we go now the message shows up oh it don't showed up when we opened it from a one of the specific type of ones I think so so I think we need a view is it just called workspace oh did you yeah I believe the view is called workspace so we'll want to create a view for workspace and it may be the same as our do we have different views for different types of artifacts these do have different views for different types of artifacts how do we handle that in workspace can we have different views in workspace or can we only have the workspace for you that's it that's it let's go to the docs question or something yeah I don't know the answer there I've been somebody in chat no I suspect if you go to the workspace configuration and take a look at the the list there might be a witch things open is there something like hmm it chooses which workspace what if we what are our oh not a lot of attributes available so it lets you pick which workspace it but not which view is there anything else here so if we go to yeah let's check the docs on that set up a list view create list categories filterless how about something with a form a record view workspace record adding components view components this is a nice little nice little graphic here but it's a nice scratch so basically what we want to do is is do something with this form pane what happens if I click on the setting up forms and workspace so Tommy says if we click the avatar in the workspace then I have some options for configuration of the page interesting well let's try to wonder if that helps me pick I think that was the wrong one yeah that the avatar in the works configure workspace is that what they gave it that's here that takes us to that hold on we've it showed us on this article configure workspace configure agent workspace new record menu so we need a new new record that's like an ax let us do it so let's go to the list what's hit new down down this way or how about one more dot nope okay thanks oh now we got some more stuff so if I do configure no still now I have been to that menu at one point top right corner in the new workspace I mean that's go to the go to home and then try the dots the dots one no okay how's that that was my try let's read this more carefully so click on your avatar form Liam do we need procedure yeah I don't agent workspace new record menu maybe it's because we don't have a form view oh that's a great point what if we create a form view for workspace first let's do that because maybe it needs to have a record to operate off of first so that it can then configure that record oh I've never seen this window before the view the view default has not been configured and the default view has been loaded I don't think I want to do that we're not going to configure that view anyway I think I've done this before your computer suggests that you might have created able a view for a workspace at one bar a and so this is a lot of what we have in there I think this is our this a default artifact view that looks like the artifact view that you were already in I'm gonna take some of these things out well leave the sleeper all right let's leave it off then we'll well tweak all right so we now have a workspace for you hopefully load the whole workspace yeah all right our message went away and hey figure page look at that all right if we had if we had a drink I would take a drink here nice so form layout seems like well I think this is gonna take us back to regular it's gonna die yeah all right well that's fine um I'm okay with it jumping me there what else we have form header UI actions the ribbon side panel this is basically all of the elements on our workspace page we can configure from here but it doesn't really help us with how do we how do we get different form views per or different types of records it's the same yeah so I'm thinking that we need to go check out something on though their records themselves to see which form view it's gonna open up my yeah my but I'm worried that since they're all the same they're all the same record type that it's gonna get angry at us if we don't use a workspace form view yeah my my thought is that the workspace is just hard coded into workspace and it's going to look for the workspace view and if it finds it that's what it shows if not it just the default view because if we had this would be a lot easier if we had extended like an artifact table into a blog post livestream video right because then each of those could have a different well yeah they could all have their own table but these aren't separate tables I don't really want to do a lot of field showing and hiding nor do I know how easy it is on workspace to do that yeah so we just you know make it so that it works for all of them which is basically the default one I guess so now I wonder go ahead I wonder if what we want to do is do a generic form view and then maybe build us a component that shows other stuff that's specific to that type of record that we show yeah that we're not here don't really help us because we don't have a good spot to put it I mean we could put it in the sidebar here but it's a pretty limited space yeah but that absolutely we could we could look at doing that I mean it it's definitely worth trying we can't do that on this show yeah that's a good point yeah less than 12 minutes we're not creating a component and getting it into the sidebar in 12 minutes cuz Tommy says check menu workspace few rules for multiple views maybe hey Tommy gets a gold star today looks promising I think Tommy has worked with workspace before yeah and we're working with it because we haven't worked with it very much like I played around with it before but never actually like needed to deploy it so we're gonna good let's let's first see if I let's if I put artifact let's see if we have access to select other views here oh yes conditionings in our the class so easy huh thanks Tommy so let's let's create a blog view and I think we can do that like this and then for our blog I think these are all pulled out ranks we reviewed oh yeah we're pulling them out for now do we use parent I do use parent but it's not just brain or you don't need duration do we need audience no how many we have three and five categories over here all right you know you're gonna mess me up it's hot they can't be they can't be off I can't handle that it has to be even I agree mitosis the categories is one I actually like use all the time we don't see it changed later that's fine [Laughter] so title abstract description can't do we want it we don't use I get content for blood wells it mmm that's part of the automation that we might add in but for now no I got it we do want do we want publish URL we've got slugged if I click into a post do I want to be able to open the yeah I think probably we put it on the list yeah I think so so I think that's good for now what do you think yeah I'm not sure about the location of some of those cuz the end split is gonna be solved generator like slug doesn't need to be in a long and published URL probably it needs to be like yeah some point most leave it like this for now and then we can we can argue about where it goes later yeah it's at least balanced yeah so that is not the few we just created that is not the view he just created hopefully I'd say all right so now we can select oh you probably didn't need to reload that that's a reference for you maybe right this should have been fine blog alright so I mean blog workspace for you this is a workspace view rule record you probably can just log do you think it shows up and few rules that's my only alright let's just say blog workspace will compromise what compromise his blog post alright and what I've had other choices we get there and we form settings and form tabs I'm interested in those form settings oh hi details and UI actions don't want that I don't need that and sure alright that's our only option I like the default tab focus yeah those nice that's nice alright those are clearly sections that are going to have more choices at some point yes alright someone designed those to have some stuff in there and we just haven't deployed that stuff yet so let's open a blog post and see if we get at the blog view oh I think this looks alright that looks right published yeah that looks that looks right cuz categories on the left which is this is the only place that that's true so let's look at a not blog post and see there we go and now your categories on the right that's pretty great how nice we can just I'm gonna move this all over the forum for every other artifact crazy alright so I think that works best few rules yeah who knew Tommy did Tommy did Tommy say MVP today well I'm gonna stop sharing here my our broadcast thing wanted to do some updates no you cannot update right now [Laughter] few few more minutes VM and then you can do your updates Matt at the moment so that was great so we what we did today in summary is we created a new application a new scope gap that the only point of the scoped app was to use guided app creator to create our workspace we configured that workspace to point to our artifact manager table which is our custom scoped application table within that we have architectural II designed it such that they're all it's a flat table but there are types that are different we could have used table extensions you know if it was designed that way originally it though all of those could have been extensions but that also caused some so that was that was a design decision because sometimes I thinks arts out as a blog post turns into a video and that sort of thing is painful if you're using you know separate tables you know separate classes because you'd have to de-escalated down a classic and then up as Glade it to a different class and that kind of a overhead was not desired but thankfully the workspace view rules that we found allow us to have different views for those different types which which was great and what we saw in there was that it also is available for conditioning filter per workspace and rolls so those seem to be really granular in and flexible in win in what form view gets opened when you interact with a record in a workspace so what else did we do we we created a new list entry in our workspace at after guided app creator was done we configured the fields in both of our lists the one that was auto-generated and the one that we created and then we configured some form views which is pretty traditional stuff to do when you're setting up a new interface is configuring those form views did I miss anything there but I don't think so I think you covered it so go ahead one of the you know now we have this workspace I'm sure we will work on it off air and kind of get it to get it to where we want it prettify it and then on future shows I'm sure we'll be doing some component building so if anybody has any ideas on you know components yeah obviously you guys don't know a ton about how we use artifact manager but if you want to leave a comment or send us a note on what type of components might be good to add to it you know we would love to hear some ideas yeah that that's a great point so certainly share if you have some experiences you know configuring workspaces and making them awesome let us know because then we can you know one leverage it for ourselves and share it out to others as well excuse me so that was fun and we'll definitely get at least our lists and forms configured mostly and as we come across places where we need to do more than that level of configuration we'll try and roll those into a show and if we certainly when we get to a component building or things like declarative actions that we might need to add to our workspace well we'll get those in the show or write a blog post about it so no that was awesome thanks so much for all of the help in the chat today Chuck and Tommy were we're helping us out and we really appreciate it and to everyone else who stopped by and say hello I hope you guys have a wonderful Thursday and we will see you back again next week with another show thanks everybody thanks everybody
https://www.youtube.com/watch?v=M1lsoidXHzw