can i write onchange client script on single row variable for MRVS

sonali jori2
Tera Contributor

I have currency variable in single row variable. and total price in MRVS. I want auto populate total price based on currency selected.is it possible?

6 REPLIES 6

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @sonali jori2 

I think no, @AshishKM what your thoughts

https://www.servicenow.com/community/itsm-articles/scripting-with-a-multi-row-variable-set-and-a-pos...

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

AshishKM
Kilo Patron
Kilo Patron

Hi @sonali jori2 ,

Can you please share some screen shot of both the variable position on form.

I think you can try to read the variables using the g_form.getValue() but not visualizing at moment, so share some screen shot.

 

-Thanks,

AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

sonalijori2_1-1737438487116.png

I have currency on form in single variable set and unit price in EUR in MRVS. want to autopopulate unit price in eur on change of form level currency. unit price in eur is total price of product divided by quantity.

 

Ankur Bawiskar
Tera Patron
Tera Patron

@sonali jori2 

so basically you want to set variable within MRVS based on change of outside variable

If yes then you will have to write onChange catalog client script on that variable and then set the MRVS using JSON structure

check this link where I shared solution and enhance it

How to auto populate project details in a multi row variable set 

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