Introduction to Service Catalog Variables with Demo | Service Catalog variables tips and tricks
[Music] hi all and welcome back so in today's tutorial we will be exploring uh what are the different types of service catalog variables available in service now so service catalog is the concept okay which is used widely in service now okay so whenever we are working on Portal right or wherever we want to order something out and service now we create a catalog item and that's where this variables came into existence so in today's tutorial we will be exploring what all variables type because a lot of people are not aware about all the variables which are present and what are the use of those variables right so we will we will trial to cover as much as possible as a part of this tutorial so let's get started because it would be a lengthy tutorial okay because there are a lot of variables out there so for today's tutorial uh as you can see on my screen this is my personal development instead so we will go to maintain item to search for uh what we can say is some catalog item which we can use for the tutorial okay so we'll go for for this Apple iPad 4 because I think it it doesn't have any variables underneath it okay um yeah it doesn't have any variables and I need it so we'll be using this and we'll create um why I am duplicating the tab so that we can do just try it over here okay and we can refresh it out so let's get started we'll create one variable after another one this particular catalog item and then we'll see how exact it looks on the actual service portal okay so let's get started with our first type of variable the first variable is not is this attachment okay so what is this variable so uh when submitting a catalog item request okay this variable lets you upload an attachment for question of the item okay after you upload the attachment you can also Download update or delete it okay so it has couple of properties so for example you can also set up property or we can call it a variable attribute which is maximum file size which helps you to Define what will be the maximum size of the file okay it's MB okay so let's get started and let's just so we will start exploring this out okay so I will just go and type attachment I said as soon as we select the attachment this question comes up so we will give that attached will give the same name and here we have a type specification here we have attribute called Max underscore file underscore size and you can give you can set it to for example five so it will accept the the files till the uh till the maximum value of 5 MB okay so for example and we have a system property which is Glide dot SC dot variable dot attachment dot default maximum size and it's by default set to 20. so for example if uh in case you set the variable attribute maximum file size to 25 above the property set setting okay so it will not accept the maximum will be by accident will be the property size okay which is defined in the property okay so I will set it out okay I will save it out and let's see how exactly it looks so I'll go to the other screen and I will refresh the form two and it's getting refreshed so now you can see we got oh we got a variable okay which is asking for this attachment size okay so this is how uh you can you can you can add this variable and this is the use of this variable okay next let's move on to the next variable the next movie um variable in that list is a break okay most of you must have not used this variable out so what the exactly the break does so the break breaks the catalog item into two sections okay so for example if you want to add a line between two a set of variables okay then you can use this uh variable to add a set so I will use the same variable I will just I'm just planning to do insert density on top of it so in variable we can check for break this is the next variable and it doesn't ask for any attributes or anything because it's not doing anything it's just breaking your UI into two sections okay so I will just do insert density for this and will jump to the catalog item and see how exactly it looks so this is how it looks so I will just change the order because it's of this same order right so I will just give it order as 200 and save it out if I go back and if I do f it's loading and now you can see this thin line over here so this is a break okay this is coming from break so it's basically used okay the break variable displays a horizontal line across the form this line is in a formatting element that does not collect any data okay so this is how it looks when we add other variables then you will see the difference okay okay moving on to the next variable this variable in our left is check check so what exactly the check does so the check box variable lets you enable and disable option by selecting and clearing it out okay so this the check box and we can give it a question as a box and I will give the order of 300. just two get below the actual value okay you can also so and you can set the default value also okay for this particular checkbox okay whether it should be true or false okay and you can also make it hidden it means this I will not go into those details okay so if we go over here and if we do F5 again so this is how the checkbox variable looks like so you can have checks box or certain things for example if you want to see key how are you interested or not okay or uh based or image subscription you can say okay so you can use checkbox in those scenarios moving on to the next next uh next variable okay which is date so I will not explain it in detail okay what what this this variable does so State one right if I go back if I go back on the tab and I will add the variable called date and I will give it ordered as 400 there will be a lot of variables which you have not heard also so these are the basics then we will go to the advances eight okay I will and it will keep the date as 400 I will insert and stay and at the same time I will add two more next one is date and time so you can see the difference okay in in all the threes okay so date is done the next one is date and time so I will add date time and I will give the order as 500 I will give it time I'm just giving any random name okay I will do certain three on this one and the next one is duration so let's go over here and let's curation incubation and it will have order at 600 I will again do incertainty so I am covering three variables at a time okay just so that you can see the difference because all these variables are what the categorithm same name okay I have to just change it out to duration okay and I will do I have to see load I guess so it got reload it was a mess from my side you should have one more learning you should not have you cannot have two variables with the same name okay so I will go with duration and I will keep it in clusion I'll copy the theme I'll paste it okay and we will do incertainty so we have added three variables state and time and duration okay if I go over here and if I refresh it out so now we got two variables one variable is still missing okay let's see what happened to this I'll give it as 600 instead density so I it got saved now if I refresh this out so let's see the difference between three variables I'm not aligning it out okay so the first one is the date so if you select if you go to the date so you can simply select the date okay so for example I select 23 when it comes to date and time so you get a provision to select date as well as time okay I will give it nine and all this okay and the third one is duration here you can Define the duration okay how many days hours minutes or seconds okay so I will give one day one day and it will work expected now the next variable okay we have completed duration now the next variable in our list is the email so I will go over here and we'll go for email variable what email variable is doing okay the email variable creates a widget to enter and select email address okay the variable accept only email expression cutting at the rate okay and domain information so it has it follows the records pattern okay and if you add it into valid request and that is at the rate and ending with the domain okay then only it will accept or else it will not accept so I will give it the order as 700 will go and we'll get fit like emails Ctrl a Ctrl C paste and I will in certain state control tab I will refresh it out to see other variables coming so now you can see the variable came as email okay now if I give ABC over here okay so it will not accept it out I'll say so I have to give ABC address Gmail .com and then it will it will it will accept okay this is done the next variable in our list is HTML so no need to explain it in depth okay so what HTML variable does the HTML variable let you provide content with Advanced formatting okay include image category for image for catalog item okay you can also add CSS or htms gift if you need it okay so I will just add HTML and it should come up and I will give it order as 800 and I will give HTML and I will do incident state so if I go back and if I refresh the form so this is the HTML format so you can type anything out if you want to type a code source code you can use the source code editor and you can do all kind of stuff like bold italic whatever you want to do okay so use this very use the variable to create feeds for user input okay you can also use this variable for you reusable content when you want when you when put into a variable set such as terms and condition kind of thing okay if you are asking server so this is done with this variable now the next variable in our list is IP address now or variables which you have not heard of okay or which you must not have used okay so we'll jump into a new variable which is IP address okay address so what this I will make the order as 900 and I will give it as IPA address Etc paste and we'll do the incidence fee so what this variable does so use the IP address variable to specify the ipv4 and IPv6 data okay for catalog item under the validation script submodule or validation script type associated with this variable is available okay so it it allows you to add IP address for anything okay so if I what happened over here I will go back edit update let's try it once more time IP address I'll give it 900 I will give it IP and I will do uncertainty ideally it should work so it worked okay we'll go over here we will refresh the form how exactly it looks as it got disappeared or what okay if I scroll down IP address is like it looks like text field but it's not okay so it's like 256.256 Dot zero one something like this okay and the validation there will be some validation at the back end okay the next variable in our list is label okay so the label variable displays a label across the form okay so label labels are formatting elements okay no data is collected okay so for example if if you want to display certain text okay and during the and the form okay some static text okay then you can use your label variable so there's a label I'll give it a order at 1000. give it as name as label and I will do incertainty if I if I do what happened if I go here and refresh this form and then label will come up but we have given the value and sleep and that's why it's showing labels like this so it you can Define certain instruction okay you can use this label to arrange questions into section okay you can also use label for question with multiple options for example check box for the different options for question okay so you can just if that is static field now the next in our list is list collector okay so the less collector is the same which you use in a native form so the list character is a multi select reference field okay where you can see multiple records okay for example you have this if you want to select multiple users so you can do using this collector so I will just go to list character order as the zero I'll get a question that collector I'll give it and here you have to Define certain more attributes because it's a reference field multi-reference field so you have to go and you have to Define which particular table you want to reference to so for example I will go with the user table for example if you want to raise a request for multiple users so you can do the same so it's this is just use the table and you can also define surface qualify for example you active users and all those kind of stuff but we will not go into that okay I will remove this file size we don't need this attribute for others and I will do insert and stay and let's see how exactly it works so what this collector does okay to the timer the list collector variables create an interface that lets you select and add multiple records from a table Okay so it's getting loaded and it should it should act like a so here you can see it acts like a sludge bucket okay so I can add multiple users okay in this particular slash bucket there are attributes called light list you can consider you can change the interface okay into cloudless format also this is done you just try to understand the application of all these data types okay people are not aware about all the data drives okay which are present in the system the next one in our list is look up multiple choices choices I will give it as an order as 0.200 okay and what it does okay so the lookup multiple choices create radio button using the data from a table okay so if you have a refresh table okay based on the reference table values it will create multiple records okay so for example I want to go and you should be carefully while using this out okay so it's functionality is just similar to lookup select box variable okay which creates a choice list from a query table okay which will be coming as the next variable right okay there are a few nodes okay uh disclaimers you can say table with large data causes performance issue okay when loading the page okay use reference qualified to reduce the variable set okay and you cannot add more than 10 000 choices on this okay okay so I'll be using which will be the small setup which will have small set of Records so for example let's grow up the system so I will do cmdb some table comes cmdb what should I use ad controller I don't know whether it has data or not and which field you want to see so let's see the name if it has name you can Define what exactly you want to see as a choice as as a radio button okay sorry okay and I will not add other things out okay and I will just do the insert entity I'm not pretty sure okay that at this particular table has something who I I again missed to change the variable question so we'll go back and we go and we will do [Applause] look up multiple choices I will go to question multi I will give the name [Applause] look up multi again we will go to test interest type specification will select table so it will be cmdb what I should go something good right a DeForest app server I think this will have some data okay and over here we'll take name as the display value okay I missed one more thing I will give it 1200 as do in certain speed this time it should work okay and if I go back and if I replace the form so let's see how exactly it looks so we are referencing to a table we have not created a choice we have just create we have created a reference and that reference will create a choice for us isn't it amazing now you can see the P the form is taking longer time to get load okay because it's calling certain reference fields to get the data okay so I think it has only one value okay and which is Java application so if you have 10 values then it will show 10 choice list and you can do multi select okay let's try to change it out to some horrible thing or database I can [Applause] cmdcr database and name okay all right save and go over here and refresh I'm scrolling down down and now you can see oh my God it has this much of Records so you can select multiple so you you get all the all the values right okay this is good right I I'm not really sure whether people have used this Auto in the projects now the second type just like this okay is like lookup select box okay so this was a radio button now you will have a drop down kind of works things okay so you can go look up select box okay and I will mark it as 1300 okay I will give our lookups select okay I will just change this out select okay type specification will look we will keep the same okay what exactly does this does okay so I will just follow the incidence here so the lookup select box variable create a choice list using data query from a table okay its functionality is just similar to look up multiple choice variable creates radio record buttons okay from a query data okay instead of that you will get a choice field kind of thing okay okay so we'll go over here to see the difference I didn't change the reference if you don't have to create so many choices for example you are you are you want to create choices based on certain table okay so a lot of people do the manual creation of choice but that's not a valid way because it will not be updated list okay if something get added to the parent table okay you have to again come and create a choice if you missed it will create a mess so here you can see this is how it looks look up select box okay if I click on this the same set of values I'm getting okay which has there for lookup multi okay but in a drop down fashion isn't it amazing this leads to the next data type which is masked so mask pretty new to have a lot of people I guess okay so the mass variable insert a field that mask the entire entire text entered okay each character entering is displayed as an asterisk okay if the index variable you can ask sensitive information to the user such as password okay so I will give it a name as a mask [Applause] I will not add any annotation on its specification you can also ask confirmation and you you can use the inscription okay if you need it okay so it will increase it out into base64 kind of string okay so I I'm not really sure whether it was 1400 I will keep 1500 okay don't want to get errors now so you saw the checkbox over there right use encryption by selecting the use encryption checkbox you can configure the variable to encrypt its value using various encryption algorithms before storing it into the database okay these values can be dipped decrypted by using the variable okay decrypted decryption algorithm okay so I will go back to the form if you have already created a lot of variables and we will be creating few more so I have to scroll pretty down and you can see this mask okay so for example if I ask my add my account password also I don't have to worry because it it's masked okay and if I do show it will show but this is this option will be available only with the admins okay so nothing to worry it's it's the safest way to get this institute data okay then the other variable is multi-line text okay a lot of people want to be using this so I will not go into tab for this so I will add multi-tie line text and a single hand text at once to show you the difference so first we'll go with the multi-line text okay I'll give it to order 1600 and what multi-line text does okay so [Music] multi-line text uh variables creates a field that lets you enter multiple lines of text okay the name only signifies what exactly it does okay and single line what it will do it will it will ask you to enter only single line so I will give so this is a multi-line okay I will insert and stay and now the next one is single line right so we will go for a single line hmm and there's one more there's one more okay we will look into that also and which is so what single line text does it allows you to it allows you to add single line of text okay so I will do insert and stay on this and the next one of the same category according to me his white single line test so what is the different way of single line text and white signal entry the white single line text variable creates a field that spans the form okay letting user enters a long line of text okay so let's do that as a wide single line text and I will I will add it like this right I will give the order 1800 what I did why I did this because it falls into the same category I guess okay so okay so we'll go over here we'll go over here okay and refresh it out okay uh yeah we want to reload thanks so you will be seeing difference between multi-line text single and text and white single line text okay so the first one is a multi-line text as you can see I can add multiple lines over here the second was single line text it has a finite number of characters you can add accommodate and the third one is wide line texture okay it will it's just like a single index but it can accommodate few more characters okay oh you can see the character length is quite large for this now the next one is multi-choice okay I think we have covered already a lot of variables okay so let's see a few more so the next in our list is multiple choices okay so we have seen the single choices now we'll be seeing looking into the multiple choices I'll give the order as 1900 okay that means we have completely covered this will be the 90th variable in other and I will give it a name multi choice multichoice and we will do it and you can add the choices okay so I I will add choice also what is it so if you see then the next one should come d e f and then what ghi okay I will add only three and we'll do incertainty okay I'll refresh it out I've already screwed the form sorry for that thank you so what multiple does the multiple choice variable create stereo button for question choices okay whatever we have added okay to the list so we have added three so it should create three question choices so I will scroll down down down down and it's not showing anything why it's not showing anything oh we have to do it after the save okay so I'll do ABC because at that time the record was not getting created EF GH I and I think it should see so we will go back fill the phrase the form and probably this time it should come thank you okay if you scroll down now you can see EBC on the why only ABC final DF because it's shares the same order so I will go over here and I'll refresh it's been a long tutorial this one still ABC just reload the form and see if we are making this something why it's not getting updated we can save it over here yes I think this got saved now this time it should get reflected foreign not sure what causing this is short but if I'm missing some annotation because I will give if I save this out I think it's coming but it's coming below the screen I'll just give it a last try I'm not sure okay what's the problem with this the next variable in our list is generic scale okay so have you ever used variable numeric scale so numeric scale defines a new mix kill okay which is a variable creates a set of radio button from a range option like so if I I will give it an automatic scale I'll give the same option I will mark this and I will do insert density let's say if I go back to this variable list to this form I have a refresh um it should create skills so you can see one two three so you can scale it out okay one two three four okay now it's for are you happy kind of character are you happy with the whole culture then you can scale it out one thing worst and five being figured the next is like a lot of people do the mistake on this one okay so which is first we will look into that reference so reference as you know right so it will reference to certain table and you can select one record from the reference table okay so reference I will give it a name and you have to give the touches you have which table you want to refer to increase this from this code user so this is a table and I will not add any reference qualify but if you want you can add any error for example let's add activists okay I will insert it do uncertainty to create a new variable okay and I will go over there and refresh it out so [Music] let's reload so the refrigerator references the record in another table for example a variable name point of contact okay reference is to use a table okay and you can add reference qualifiers and all those kind of things on top of it so this is a reference field okay and now if I click on this so it will be pointing to a reference table with a query act equal to true perfect right now a lot of people whenever you want to create a requested for right okay uh that whom you are requesting this item for okay so people will create a reference field and then they will do all this kind of thing reference to user different but you don't have to do this because there is already a field created a variable available for that which is requested for okay and I will give it an order some 200 and you can simply give it a name as for requested I will give no need to give this specifications and all okay no you need to give which table it belongs to okay and if there is a check box right enables it so I will keep this rfx call you for asses and I will do insert density so so what this variable what is the significance of this variable so before submitting a catalog item request this variable helps you to specify the request can be submitted for okay okay so you can specify this information while answering Capital answers okay okay so I didn't Define any table right that it belongs at each point to the reference it should have referred to the user table if I go over here and if I refresh it out this works like a reference field but it will Point directly to the ref user table only let's create it for that let's see if I scroll down if I scroll down down so you can see it it's it's a reference to user table and it already picked the value of the logged in user now it works isn't it amazing right so the next variable in our list okay is six text label okay so what is restricts level so this variable displays a formatted label on a catalog form in the tiny make text editor okay you can format the label add image and do whatever you want to do so for example if I I will I will go over here first of all and I will to search text table I will give it this is which okay level and now you can format this text out for example I make this as green I make this as red Maxi says I make this as 12 points okay anything you can do and I will make it as blue anything any anything you can do and I will give its name Stitch label I will make it 203 to 30 okay I will do the density so you can do all kind of formatting okay it's just like a label but it's you can you can make it if you can beautify it out so I'll go over here F5 to replace the form let's scroll down so now you can see this Rich Text label okay it has a different color all these things okay isn't it amazing I'm not pretty sure you can beautify your catalog items okay using this the next one is Select live single line text we have already covered it out okay select box select box we have to Define I will make it to four double zero select box check box and I I can see this out okay I'll do uncertainty and then we will Define the values the choices for it so I have saved it out now create a question choices so I'll give ABC 100 the 200 and so on okay and I will save this out so if I go over here F5 so the select box variable creates a list from predefined question choices okay so here we are just loading so if we go here and this is Select box right so here this is how the select box looks like okay the next second last thing on my list okay is URL so the name itself signifies what exactly it will do so the URL infused to store the URL so it will create a hyperlink when you save it out right so it will create a hyperlink from the text which you have created okay and it follows a protocol like HTTP https scriptp kind of thing okay so whatever it will be followed by this it will consider it as URL so I will give it a name as and after this 2.0 that's it and I we can give a placeholder also like http double size check no more dot in this my official blog website not this one couldn't deposit slash okay and I will do incertainty and we will again go back to the form we will reload foreign so here this is how the URL looks like okay if you save it will so it's not editable it's just a placeholder okay so you can give me just to give the guidance okay how to add this out google.com for instance for instance okay so this is one variable and the last variable is yes no if you want to ask some question okay like do you need this today okay and then a user can reply yes or no okay so for that also we have a variable you don't have to create a choice for this kind so yes no it costs 2 6 2 6 0 0 known inputs needed you just have to go yes and you can do it in certainty go over here F5 reload and if I see if it comes handy it's again a long time because we have had a lot of variables on top of the form so you can see this Fiesta right so it has two value yes and no by default you can set either of the option yes or no okay so today we have covered a lot of variables which we can use on a service catalog why I've done this demonstration is like I've seen a lot of people who are not making a perfect choice of variable for their questions okay and using this tutorial I think it it will help to take the decision which which type of variable we should use for which particular component okay there are two more variables oh [Music] but I'll be creating a separate tutorial for the same okay because it will be a pretty time consuming the first one is the custom okay and the second one is a UI page so I will cover it in the upcoming tutorial okay if you have any queries on this particular tutorial please drop me a mail my email address is technomanc123 gmail.com you can also reach out to me on LinkedIn or you can drop your queries on this video I will get back to you okay and try to resolve your queries till then stay safe stay happy and have a nice day thank you
https://www.youtube.com/watch?v=PTRxI3t7u9Q