get MVRS values in catalog client script

marcn
Tera Expert
 var mvrsvalues= JSON.parse(g_form.getValue('mvrs_name'));

g_form.addInfoMessage(mvrsvalues)

is it not possible to get mvrs json in catalog client script ?

 

I'm just trying to log the json string and it doesnt work, trying in onchange of a variable of MVRS using catalog client script for a catalog item

11 REPLIES 11

thank you, then how would certain validations can be done, do you have any suggestions ?

if we need to validate some variable in MRVS with other same variable in added rows in MRVS

I'm just trying to compare some values in MRVS in onchange client script with already added rows in MRVS.

Hi,

you can refer this link which tells you how to detect the add/remove row

Based on that you can try to do the validation

MRVS detect when a row is removed or deleted

Regards
Ankur

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

Thanks for the link to the post, I have to compare before submit.
So I cannot use sc_multi_row_question_answer to compare.

Hi,

you can get complete JSON from MRVS in an onSubmit catalog client script and perform the validation

Regards
Ankur

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

@marcn 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

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