- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-01-2018 07:53 PM
In creating a new hardware record, i want to auto populate ''Department'' and ''Location'' fields when ''assigned to'' is not empty. Basically, i need the Department and Location field to have the same information from the user profile in the ''assigned to'' field.
Can anyone help with a script for this or is their a condition i can use to achieve this?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-01-2018 09:07 PM
Kiff,
This should be OOTB functionality.
You should have a Client Script on the [alm_asset] table called "Set Loc/CC/Dep/Com from assigned to".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-01-2018 08:16 PM
Hi,
How are you creating these records? Is it a manual creation or via some Transform or integration?
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-01-2018 08:18 PM
Hi Shloke04,
It is manual creation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-01-2018 09:04 PM
Ok. Then write a Script Include and a on Change Client Script on that table to set the values for both Location and Department. Please refer the below thread which gives a very good example on how to do this:)
https://community.servicenow.com/community?id=community_article&sys_id=9f7ce2e1dbd0dbc01dcaf3231f96196e
Hope this helps. Mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-01-2018 09:07 PM
Kiff,
This should be OOTB functionality.
You should have a Client Script on the [alm_asset] table called "Set Loc/CC/Dep/Com from assigned to".