Not getting value of filed using " g_form.getValue("Filed Name")"

balaji_prusty1
Giga Guru

I have a user defined filed(u_in_freeze_window) in Change form, which is read only through "Configuration Dict."   I tried to get the value of the filed in UI action using "g_form.getValue("u_in_freeze_window");" but it gives   Blank Value always. But If I use same command in Client script   Onload, it gives the value.

I need to get the value of filed in UI action to perform some action. Need help/assistance, Why I am not getting in UI Action but able to get in Client Script.

6 REPLIES 6

Ajai S Nair
Giga Guru

Hi Balaji,



g_form can only be used on the client (for instance, the web browser). So you have to check the checkbox 'Client'   in the UI actions. Then g_form will work.


Please refer below knowledge article for reference :


ServiceNow KB: Determine if the UI action is configured correctly (KB0547282)


balaji_prusty1
Giga Guru

Hi Ajai;



Thanks for Quick reply, Here I am using client script in UI action by selecting "Client" check box.



find_real_file.png


Can you give a screenshot of the remaining script part also


balaji_prusty1
Giga Guru

find_real_file.png