- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 07:49 PM
Hi community,
I need to map from u_pillar to new field u_gt_pillar in sys_user table. For example, I want to map BU - BE - Group CEO from u_pillar according to its GT Pillar is GSD-BE. I need to ensure any changes in Pillar field will auto refresh/ update the "GT Pillar" field accordingly in user table. So that the information in both fields are in sync. How to achieve this ? Kindly, please help. Thanks
Solved! Go to Solution.
- Labels:
-
Project Portfolio Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 08:13 PM
Hi,
If this is one time activity then you need to run fix script/background script to map both field values.
If you want that behavior from this point onwards then you can use business rule or flow to populate another field.
You can run below script in background script:
var grUser = new GlideRecord('sys_user');
grUser.setLimit(1000); // use setLimit if you have more records
grUser.query();
while(grUser.next()){
if(grUser.u_gt_pillar == 'BU - BE - Group CEO'){ // use value of this choice as per your configuration
grUser.u_piller = 'GSD-BE'; // use value as per your configuration.
}else if(grUser.u_gt_pillar == ''){ //same logic for other choice goes here
grUser.u_piller = '';
}else if(grUser.u_gt_pillar == ''){
grUser.u_piller = '';
}
grUser.update();
}
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 09:33 PM
Your configuration looks good to me.
Try removing the condition (filter condition).
I hope you have used correct values for u_gt_pillarr field (11,12 etc).
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 09:37 PM
Hi, It's only update for BU - BE - Group CEO, others not updated in GT Pillar column. Why ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 10:31 PM
BR will work for only one record at a time.
If you want to update all records then you need to run background script.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2022 12:11 AM
Hi Anil,
I've added setvalue then only it works fine. Btw, I need to run background script to map pillar to new field GT Pillar. From your script, the limit that you put is 1000 is that mean the system will run for first 1000 user only ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2022 12:22 AM
How to update to all user ? what script do i need to add in gr.addQuery('',''); ?