How to do autofill for a read-only Reference variable

Flavio4
Kilo Sage

Hello,

In a record producer I have:

1.  a "Location" variable, Reference type, to table cmn_location, for the user to select the location

2.  a variable "Security officer", Reference type, to a custom table "u_location_so", to display the Security officer for the location selected in 1.

I thought I could do it with the Auto-Populate variable tab, in the following way: as the table u_location_so, has the columns:

- u_location, type Reference to table cmn_location
- u_type, type String (to identify the type of SE I need to display)
- u_so, type Reference to table sys_user

I created a variable "so_location" of type Reference with:

- reference to u_location_so
- reference qual condition: [Type][=][Security] /* to select the right type of security officer
- attributes: ref_ac_columns=u_location;u_so /* to display the location and the name of the security officer
- auto-populate: Dependent question: "Location", Dot walk path:Name /* to use the value Name of the cmn_location table to index the u_location_so table.

Unfortunately only the u_location column is displayed by the so_location variable.

Is there an explanation?
Is there a way to solve the problem and show the Name of the sys_user record referenced by the u_so column of the u_location_so table referenced by the variable?

I tried to add also a variable type Reference to sys_user and auto-populate from the so_location variable, but I couldn't make it work.

I have the impression (but don't know how to check) that for table u_location_so the "key column" is Created, insteal of Location or other, and this makes the auto-populate to not work as expected.

Thank you in advance
Flavio

5 REPLIES 5

@Flavio4 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader