- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2024 01:55 AM
Hi,
I have retrieved a table value, and want to display it on the form using Glide Ajax. The value is retrieving correctly from the table, but is not displaying on the form. I have performed the debugging, and the found that value has retrieved successfully from the table.
In the attached picture, you can see that the value of the Directorate field is not displaying in the field. I want to display the value in the field.
Kind Regards,
Aqil Sajjad
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2024 01:59 AM
@MuhammadAqS Directorate is a reference field and accepts a sys_id (32 character unique identifier e.g. 965a1dd847d21654a6124bad436d43db )as value instead of a string value like Technology. You need to set the sys_id of Technology record in place of string "Technology" as value. Once done value will start reflecting correctly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2024 01:59 AM
@MuhammadAqS Directorate is a reference field and accepts a sys_id (32 character unique identifier e.g. 965a1dd847d21654a6124bad436d43db )as value instead of a string value like Technology. You need to set the sys_id of Technology record in place of string "Technology" as value. Once done value will start reflecting correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2024 03:02 AM
Hi @Sandeep Rajput,
I would greatly appreciate your assistance in identifying the specific changes needed in the following code to resolve the issue
Script Include:
getUserDataById: function(userId) {
var userRecord = {};
var userGr = new GlideRecord('sys_user');
if (userGr.get(userId)) {
userRecord = {
sys_id: userGr.getValue('sys_id'),
operatingdivision: userGr.getValue('u_operating_division'),
};
}
return userRecord;
},
process: function() {
var userId = this.getParameter('sysparm_user_id');
var result = this.getUserDataById(userId);
return new JSON().encode(result);
}
});
Client Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2024 02:05 AM
Hi @MuhammadAqS ,
I icon indicating that filed have value but as it is a reference field so may display filed value for this record have empty, hence it is not showing here. Open that record and update the display value , it will start appearing on your field.