I am confused that, why can't we use dot-walking instead of Ajax call to auto populate fields?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2020 04:00 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2020 04:04 AM
Hi,
You can use direct dot walked field on form by configuring the form layout.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2020 04:08 AM
Just I checked on Incident form by configuring it. I can dot walk like Caller.Department.Name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2020 04:16 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2020 04:06 AM
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.
Muhammad