- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 04:00 PM
Hello Everyone,
I am looking to populate a reference field (manager) based on a string field (manager_email) on sys_user table. The string field has the user's email address. In order to ensure the manager field has the correct user name, we would like to reference the email to auto populate the manager name. Please advise with a script if possible
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 07:29 AM
I used a "before" business rule "insert/update" and this worked. Script below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 05:22 PM
Is the manager reference a field on a table, or variable on a Catalog Item? Do you want to populate it based on the string field containing the email on the screen as the form loads? When manager email changes? If you don't want or need to see it populate on the screen, when the record is created or when the manager email is populated or changes, and/or do you want to update all existing table records?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 05:50 PM
Hello Brad,
The two fields are on user table (not variables) and yes, I want the manager reference field to populate based on the string field containing the email address on the form. Only the manager field should update each time the email field is updated or created. All other fields should not be affected (only manager field).
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 06:00 PM
it seems an onChange client script can work for the 'email' field. that calls a script include that queries the sys_user table based on the email field and then returns the value of the manager field on sys_user. the client script then sets the value of the manager field on your form. is this behavior what you want?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 06:35 PM
Yes please. That's what I need. Can you help with a script to achieve this?