How to disable "Add Row" before its submitted in MRVS?

aryanjain27
Tera Contributor

Hyy All,

 

I am doing a validation when someone adds an item in the MRVS using client catalog script within the variable set not on the catalog item. But if the validation fails, I'd like to block adding this item. Is there a way we can achieve this? I've read posts on removing buttons all together and after they have been submitted but could not find anything related to blocking the Add Row. Or is there a better way to achieve this functionality?

 

Thnx in advance!

 

Screenshot 2025-03-09 145514.png

1 ACCEPTED SOLUTION

Shivalika
Mega Sage

Hello @aryanjain27 

 

You can create "On change client script' in the variable set, where you do the validation on values. If the validation fails please "first clear the values" and then add "error message or alerts." 

 

This will work because when you clear the row values the row is automatically invalid and it has nothing to add. 

 

Please mark my answer as helpful or accept solution if it helped in anyway. 

 

Regards,

Shivalika 

 

LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

YouTube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=C1_aARKZweXTIsx-

View solution in original post

5 REPLIES 5

Hello @aryanjain27 

 

Please mark it as "Accept solution" 🙂 so that it can be moved from unsolved bucket to solved bucket. 

 

Regards, 

Shivalika

 

LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

YouTube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=u3nWGJraLDUPB2Ua