How to get Field values of a form in a UI Action

Madhan007
Tera Contributor

I have a form in ServiceNow (not in service portal) ,which users fill the fields  and submit . I have to create a button  UI action on the submitted form , that collects the field values and updates another field on the same record. I dont understand if I have to go with client side/ server side UI action. Also To get the field values,I tried "current.variables.<variableName>" in server side UI action and g_form.getValue("variable_name") in client side UI action, but both methods does not seem to be working. please pour your suggestions on how to make this work.

1 ACCEPTED SOLUTION

Anil Lande
Kilo Patron

Hi,

Please check below links:

https://www.servicenow.com/community/itsm-articles/client-side-and-server-side-code-in-one-ui-action...

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0657198

 

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

2 REPLIES 2

Anil Lande
Kilo Patron

Hi,

Please check below links:

https://www.servicenow.com/community/itsm-articles/client-side-and-server-side-code-in-one-ui-action...

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0657198

 

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Madhan007 ,

 

Which form are we talking abt over here is it a Catalog Form or a Incident kind of form ?

 

if its incident kind of form then please use server side UI action & to fetch values use current.field_name.

if its catalog form, can u post some pictures to understand a bit better.

 

Thanks,

Danish