I am confused that, why can't we use dot-walking instead of Ajax call to auto populate fields?

rkreddy
Giga Expert

Hi Everyone,

I have a doubt that, when I want to populate Manager, Department, Title or some other fields depending on some reference field( which is referring to user table), why can't we use Dot-walking instead of GlideAjax. For example I have a Requested for field on form referring to user table, and I have Manager, Title fields which needs to be auto populated depending on Requested for field. Here Can I user dot-walking instead of GlideAjax?

Thanks.

16 REPLIES 16

Dhananjay Pawar
Kilo Sage

Hi,

You can use direct dot walked field on form by configuring the form layout.

Just I checked on Incident form by configuring it. I can dot walk like Caller.Department.Name

Thanks Dhananjay,

Yes, I too tried on the custom table, it is working just like the client script works. The manager and title fields are populating based on requested for field and even working when we change the value in requested for field.

MrMuhammad
Giga Sage

For that, you can use getReference to get the reference of the referenced tab and inside callback function, you can dot-walk.

Example script

var caller = g_form.getReference('caller_id', popCallerInfo);

function popCallerInfo(caller){
      //Location setting section
    g_form.setValue('location', caller.location); //dot walked to location field
     
}

However, if you need to get multiple fields from the referenced table, GlideAjax is recommended then. 

Regards,
Muhammad