g_form.Getvalue(field) does not return anything

wakespirit
Kilo Guru

Dear all,

I have the folloing script code snipet on which I store in  a variable the current value of the State field of incident form

var incState = g_form.getValue('state');
jslog("CAL : THE VALUE OF THE INCIDENT IS : " + incState);

What is happening is that, the all script execut and work as expected, but that simply line does not return the proper value and instead when I check jslog entry incState is all type empty..

Any idea why and how to solve ?

regards

1 ACCEPTED SOLUTION

Ct111
Giga Sage
Hi , How is this possible, it should return a value .. have you created a customized state field I mean If a customized state field is made only then it can be possible var st = g_form.getValue(‘u_state’); And this u_state is set and rather than that you are getting value of state which might be empty. Go to that field on the form Right click and click on show option and check details Mark my answer as correct n helpful if it helped

View solution in original post

3 REPLIES 3

wakespirit
Kilo Guru

I solve it sorry. it was a typing mistake

What was the typing mistake, because we are having the same exact issue?

Ct111
Giga Sage
Hi , How is this possible, it should return a value .. have you created a customized state field I mean If a customized state field is made only then it can be possible var st = g_form.getValue(‘u_state’); And this u_state is set and rather than that you are getting value of state which might be empty. Go to that field on the form Right click and click on show option and check details Mark my answer as correct n helpful if it helped