Multi row Variable set onsubmit not working.

SaiBhargav1
Kilo Contributor

Hi all,

 I am facing one issue in  my catalog item actually am using Multi row variable set in side i have 4 variables based on the three values counting, sum value has to populate in the 4th variable for that i have written on submit client script , it's not working if any one know it help me.

below script :-

var b = g_form.getValue("base_value_external");
var f = g_form.getValue("fine_value_external");
var g = g_form.getValue("gst_value_external");
var total = parseFloat(b) + parseFloat(f) + parseFloat(g);
g_form.setValue("total_recovery_amount_external" , total);

 

see the below image after submission values not fetching.

 

find_real_file.png

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron
  • onSubmit catalog client scripts are not supported for a multi-row variable set.

kindly write the script on onChange() catalog client script. 

 

adding doc link here. 

 

https://docs.servicenow.com/bundle/london-it-service-management/page/product/service-catalog-managem...

 

 

View solution in original post

12 REPLIES 12

Brian Lancaster
Tera Sage

Have you check out this blog?

Scripting Multi-row variable sets

Shamma Negi
Kilo Sage
Kilo Sage

Hi,

 

See the below script and screenshot:

 

find_real_file.png

 

 

 

 

Script :

 

find_real_file.png

 

Regards,

Shamma

Regards,Shamma Negi

Good thought to do the totals when they are creating each row instead of doing a onsubmit script.

Shamma Negi
Kilo Sage
Kilo Sage

Hi,

 

Please mark the answer correct if that helps you!

 

Regards,

Shamma

Regards,Shamma Negi