How to create a Client Script for Dot walk field ?

Yue
Kilo Contributor

Hi Guys,

Iam having a trouble about my work items. I cannot create a onChange Client script in my dot walk field. Here's my setup:

I have Request table and Task table. I create the fields in the Request table and dot walk all the field in task table. Now user needs to edit the data in the task table(FORM). Now I need to put some onChange client script in the fields. but I cannot somehow do it.. Please HELP.

 

P.S. Base request is the reference field that I created in the task table where in it is referenced to the request table. Iam somehow looking for like . Base Request.Field1 so whenever the field1 change, my client script will run. Thanks!

 

find_real_file.png

 

 

3 REPLIES 3

Pooja Mallikarj
Kilo Sage

Hi

you can not  dot walk fields using  onChange Client script instead you can use getReference method to get value of reference fields.

 

Regards,

Pooja

Varsha21
Giga Guru

Hi,

you can .walk with 1 level only with g_form.getReference() 

please see bellow link

https://community.servicenow.com/community?id=community_question&sys_id=bd008321db98dbc01dcaf3231f96...

also please provide details about your requirement. so can help you.

thank

 

asifnoor
Kilo Patron

Hi,

You shall use g_form.getReference to access the dot walk value (1 level). 

Mark the comment as a correct answer if it helps.