logo

NJP

Search using multiple columns in a reference field | Use-case | ServiceNow

Import · Nov 15, 2022 · video

hey welcome back everyone in this video I'm going to discuss another use case which is more in line with searching something in the reference field so there are a couple of options when we talk about the reference fields uh on how to search for a particular record that we need to populate on that field on a particular form so one option is to let's say click on this lookup icon and if I want to let's say search for any of the user I can simply type let's say I want to select this particular user I can simply search for that user and click on it to select it on the reference field record and the other option that is available is I can simply type the name of the user in the caller field for example what I can do is I can just type in the name of the user and it will be available for selection and then I can select it from here now what if I just don't want to search with the name but I also want to search with some other attribute so this is the caller field on the incident form which is in uh backend reference to the sys underscore user table which is present in the service now instance so let's say I want to uh type in the employee number of the user or maybe I want to type in the user ID of the user and then I want some options to come up so for this demo purpose I have created couple of records and populated them with the employee number here now if I go back to the form and search with any of those employee numbers into one so it won't work because that configuration is not done yet so how do we do it uh how do I may enable it to be able to search with let's say any of these fields like employee number is one of them so I'm going to go to the dictionary of this field and and I am going to add an attribute which specifies which field should be enabled so that I can search typing in the value of that particular field in the reference field so there is an attribute named left underscore AC underscore columns where n i can specify which field I want to enable so that users can type in the value of that particular field and the records show up so let's click on update now and now we are back on the same form so let's first check whether the name search is still working fine or not so this is working fine and now if I let's say type in the employee number so yeah that works fine and I was able to search for this user now let's Cipher some other user so I have created a couple of users over here so now I'm going to type so there's only one user which contains three four six in the employee number and I'm successfully able to search for it so thank you so much for watching

View original source

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