populate one field value in same table another field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 03:21 AM
i am created new table with below columns.
1. program manager --> reference to program table
2. user --> reference to user table.
and similarly i have created few string fields.
1, program managers
2. user name
3. user email
my requirement is i need to populate program manager (reference) field value in the program managers (string)field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 05:14 AM
Hi @siva58 ,
if you need business rule create after update business rule on your table and use below script
(function executeRule(current, previous /*null when async*/ ) {
//you can get value of reference field as below
var manager = current.program_manager.name; //give reference field of program_manager field name and instead of name your value eed to get from that record.
current.program_managers = manager; // give your string field of program_managers name
current.update();
})(current, previous);
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 07:22 AM
Hi @siva58 ,
If your issue got resolved close the thread by Accepting solution and hit thumb icon.
If not reply and share details.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 10:55 PM
@siva58 Any update on this?