- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2024 11:21 AM
Hello! Just had a question I was hoping to get some guidance on as I am relatively new to the ServiceNow environment.
The Profit Center field references a Profit Center table
The Fund field references a different table that includes Profit Centers
Both fields are pre-populated
What I'm wondering is if there is a way to restrict the Fund field choices to only show Funds that are related to that specific Profit Center populated? Also, when the form is in a specific status, the Fund field should be cleared out and require that new selection. So I was also wondering how I would go about doing that as well. Thank you for your time!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2024 02:57 PM - edited ‎09-18-2024 02:58 PM
What exactly is meant by status field. Is it a field.
If Yes,
You can write a on change client script to clear the value.
Navigate to Client scripts:
Select new,
Table: Select the table
Type : On Change
Field name: SELECT THE STATUS FIELD
Write the below script
Hope this helps. Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2024 02:57 PM - edited ‎09-18-2024 02:58 PM
What exactly is meant by status field. Is it a field.
If Yes,
You can write a on change client script to clear the value.
Navigate to Client scripts:
Select new,
Table: Select the table
Type : On Change
Field name: SELECT THE STATUS FIELD
Write the below script
Hope this helps. Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2024 04:39 PM
Yes, it is a field. Thank you so much for your help! Was there a script that you added in your last message?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2024 10:04 PM
Hi @ndejoya ,
It was the below on change client script
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
g_form.clearValue('FUND_BACKEND_VALUE')
}