- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2019 07:59 AM
I've been trying to create a topic to update the street address of a user from my HR Profile User table. I manually added a user (Abraham Lincoln) because the table (sn_hr_core_profile) was empty to start. Now with the topic, I am trying to figure out how to use Lookup Utility to change their street address in the record, but I have been without luck since there is very little documentation on this functionality and the Using GlideRecords documentation seems to not be working for me. This is what I have:
And this is the code I have for the Lookup Utility script:
(function execute(table) {
var profile = new GlideRecord(table);
profile.query();
profile.addQuery('first_name', 'Abraham');
while(profile.next()){
profile.address = vaInputs.new_street.getValue();
profile.update();
}
return profile;
})(table)
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2019 08:52 AM
Instead of lookup try using script action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2019 08:31 AM
I also tried this.
profile.addQuery('first_name', 'CONTAINS', 'Abraham');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2019 08:35 AM
All of them have table defined so try doing
(function execute(table) {
var profile = new GlideRecord('sn_hr_core_profile');
profile.addQuery('first_name', 'Abraham');
profile.query();
while(profile.next()){
profile.address = vaInputs.new_street.getValue();
profile.update();
}
return profile;
})(table)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2019 08:45 AM
No luck 😕
I don't understand why this section has the least amount of documentation and guidance/examples...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2019 08:52 AM
Instead of lookup try using script action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2019 10:31 AM
Much better, thanks!