MRVS - validation on add button

Tadz
Tera Guru
Tera Guru

Hi Everyone,

Is there a way to have a validation in the add button for the Multi-row variable set?

Since On-Submit client script is not working base on this link: https://docs.servicenow.com/bundle/london-it-service-management/page/product/service-catalog-managem...

Reason is that, when you use On-Change Client Script in the variable set, it would only validate when user clicks out of the variable. But in a scenario when user inputs on a field and tried to click add. the On-change client script wouldn't trigger.

Let me know you thoughts.

Thanks,

Tadz

3 REPLIES 3

Brad Tilton
ServiceNow Employee
ServiceNow Employee

You can run onLoad and onSubmit client scripts to do validation on the MRVS. onLoad runs when you click to add a new row and the modal window comes up, and onSubmit runs when you try to submit the row from the modal. If you're looking to do data validation and on onChange doesn't work for you those are your best options.

Hi Brad,

Thanks for the response, will try these and will get back to you.

Vinay Mishra3
Mega Guru

Hi,

 

Please refer the below link, It might be helpful for you.

 

https://community.servicenow.com/community?id=community_question&sys_id=2a151ed0db262b4011762183ca96...

 

Mark correct/helpful, If it's applicable for you.

 

Thanks,

Vinay