Client Script getValue of variable with same name as another field on same form

Katie A
Mega Guru

I created a Variable Set with a Variable that has the same name as one of the fields on the Request Item table. The variable is on a Catalog Item.

I need to allow changing the variable value in the Catalog Item view, and I need to get the new value of the changed variable in a client script.

The issue is that g_form.getValue(); only returns the value of the field of the Requested Item table, not the value of the variable that has the same name. This makes sense because it is getting the value of the first field it sees with that name.

Since it is a 'map to field' variable, I can't just change the name of the variable.

Aside from changing the name of the variable and mapping it manually, is there a way to get the value of the VARIABLE rather than the form field with the same name?

1 ACCEPTED SOLUTION

Mark Stanger
Giga Sage

g_form.getValue('variables.var_name');

View solution in original post

1 REPLY 1

Mark Stanger
Giga Sage

g_form.getValue('variables.var_name');