ServiceNow Effortlessly Display Two Columns in Your Reference Field: A Step-by-Step Tutorial
[Music] hi all and welcome back so in today's tutorial we'll be looking how we can display two column in a reference field so as what is the advantage of the same so for considering scenario you have a reference field for example a user table okay there is a field which is reference to a user table and you have a uh multiple users with the same name right so it it will be difficult for you to distinguish right which particular user you want to assign the thing so you can add one more column over there okay to the reference only which will be email ID okay which will give more idea about that user and you can assign it to that particular person I will I will show you the same okay and then we will see how we can implement it out for other use case so so let's quickly jump into incident.2 and it's applicable only to the reference freedom so if we go over here right and as you know the contextual search starts when you type star or when you type initial letters so over here you can see whenever we get the selection we get name and email ID so these are the two columns in the reference pretty amazing right I I'm not pretty sure that you have uh paid attention to this particular details okay and for an example if if Andrew if there are two multiple users with the name Andrew right so it will be difficult for you to take a call which particular Android you want to assign the incident to but if you have email ID whether it's then it it gives more details okay and it makes it easy for you to assign it to that particular person now it's already being implemented out of the box on the user reference field so let's try something different so we will go to the change table why change table just because the it has number of references so definitely we'll find some other on top of it so over here we have a model field for example let's see if model field has some record first of all um [Music] it's reading it's accepting some values out now it's settled down I guess if I do star star so we are getting so it has values right so let's try to get more detail on top of it for example if I go over here let's try what all information is present so its name and description let's let's bring description let's see for the description is filled or not yeah description field so let's bring description with the field on the reference so what you have to do it's pretty easy to implement you have to just right click on the same configure dictionary and over here you have an attribute called you have a field called attributes right so you have to add to the same we will have an address certain attributes out so the first and the foremost attribute will be ref underscore Auto underscore complete equal to complete Auto Computer equal to HX table attacks you have to be cautious whenever you are giving attributes okay the completer so what this particular first attribute does okay so you know right it will it will have an address call to get the entire object of that particular reference so for that we use this particular attribute out the next attribute in our list is left underscore SC underscore column columns now you have to Define which particular column you want to add on top of it so we want to add description so backend name definitely for every description is description only so we'll simply give it the guess so the first attribute the first attribute what it does it holds the entire object for the reference the second attribute extract for particular field we want to extract to and attach to the reference or display and the third is like when you drive the star star right column search okay they should get visible so how we can do it's a draft not red ref underscore AC underscore columns underscore search because it it will enable search equal to true we have to just make it true so we have added three attribute ref Auto completer which is equal to Ajax table competitor ref AC columns which is equal to description and the field which you want to add and then ref AC columns first is we set it to true and we are done if it's not working that the only reason will be like I messed up some some of the text oh yeah so let's go back to the change request and now if I type Rasta it will take some time first some trust scores are getting held dashboard scans are happening and after that okay it's done now if I do star star now you can see with the emergency we got description with normal we got the description for the same so it's giving some more details about the reference so this is a and I find it pretty helpful okay uh whenever you you want to take a call and you need some additional information on top of it you can simply give it over there so this is all for today's tutorial hope you like it out okay if you like it out please subscribe to my channel so that you will be getting you will get notified with my future videos okay till then stay safe stay happy and have a nice day thank you here foreign
https://www.youtube.com/watch?v=-FFs0mIJM_Q