Creative and efficient way to select & validate multiple records for catalog item

Nilesh Wahule
Tera Guru

Hi Community, 

Happy Christmas!!

 

I have a use case which kind of simple but I would like to explore different and efficient implementation options for same. Please suggest the best way from UI/UX side as well as server performance wise.

 

------------------------------------------------------------------------------------------------------------------------

Use Case:

There is a catalog item responsible to do XYZ operation of business having streamlined process and integrations etc. While filling out the details user has to select multiple records lets say assets from alm_asset table.

 

1. The user has the list of the serial numbers in the excel hence they don't want to select each one of the asset record manually, as for list collector field we need to select record individually. 

2. Post selection of the assets, we have some set of validations needs to be run on each of asset record like if its active and has active provider contracts and blah blah.. which basically cant be handled in the reference qualifiers. 

3. Post Validations, we need to show the message to user saying "{numbers of assets} are invalid cause of so n so reason" for user's better understanding so that they knows what assets are going under the catalog item processes.

-----------------------------------------------------------------------------------------------------------------------

 

What you think would be the best approach to implement this use case so that user has :

- The ability to add all the assets based on the serial numbers at once

- The functionality to validate and get the status about same based on backend validations.

- The freedom to remove or add(validated on) the assets post validation

 

I am open for even custom solutions like UI macro, UI Page or widget kind of stuff. But lets see first if we can accommodate the same in the OOTB functionality.

 

---------------------------------------------------------------------------------------------------

Thanks a bunch for your help.
Nilesh Wahule

---------------------------------------------------------------------------------------------------

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Nilesh Wahule 

I will suggest to keep it with minimal customizations

Have a catalog item with below variables

1) Upload assets - Type File Attachment (Mandatory)

a) only allow csv or xlsx file in it and have 1 column in it i.e. Serial Numbers

2) Write onChange catalog client script on that Attachment variable and use GlideAjax and validate the data inside the file by comparing it against alm_asset table. You can use CSV or XLSX parser for this within your Script include function

3) Use same onChange to show alert or info message to users about the validations. If validation fails and user requires some action then stop the form submission

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Runjay Patel
Giga Sage

Hi @Nilesh Wahule ,

 

- The ability to add all the assets based on the serial numbers at once RP- Ask user to attach the excel sheet which contains serial number and read that excel auto select the assets based on serial number.

- The functionality to validate and get the status about same based on backend validations. RP - During asset population perform the validation and display it.

- The freedom to remove or add(validated on) the assets post validation - RP- OOB they will get option to remove and add assets.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

In this video i have explained about Web service integration in ServiceNow like how it works, how we can configure it, what are the prerequisite and many more. I have covered below topics in this video. 1. understand Web Service. Like when and how we will use it. 2. Talked about Inbound and ...

Hi @Nilesh Wahule ,

 

Thank you for marking my solution as helpful! The community now supports multi-solution acceptance, allowing you to accept multiple answers.

Ankur Bawiskar
Tera Patron
Tera Patron

@Nilesh Wahule 

I will suggest to keep it with minimal customizations

Have a catalog item with below variables

1) Upload assets - Type File Attachment (Mandatory)

a) only allow csv or xlsx file in it and have 1 column in it i.e. Serial Numbers

2) Write onChange catalog client script on that Attachment variable and use GlideAjax and validate the data inside the file by comparing it against alm_asset table. You can use CSV or XLSX parser for this within your Script include function

3) Use same onChange to show alert or info message to users about the validations. If validation fails and user requires some action then stop the form submission

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

 

Thanks for your response, I understood your approach and I think its cool. Having said ,I would like to understand below :

 

1. Having the excel sheet mandatory means if they are copying from anywhere they have to consolidate in the excel only and attach it back to catalog. I feel we are stealing the ability to add the free text. Any other way?

 

2. For parsing the attachment, I think the attachment record should be present in the ServiceNow, how we will track the attachment when doing parsing in the script include ?

 

---------------------------------------------------------------------------------------------------

Thanks
Nilesh Wahule

---------------------------------------------------------------------------------------------------