Field value is not populating as expected in Case Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi Community,
We have a requirement involving the Order table, where a field named “Total AMC Hours” stores the total number of AMC hours available for an order. We have introduced a new field on the Order record called “Remaining AMC Hours.”
Each Order is associated with an Asset, and each Asset can have multiple Cases linked to it. On the Case form, users log effort in the Time Worked related list.
The requirement is:
- When a Time Worked entry is added on a Case,
- And the Case state changes to Closed,
- Then the Remaining AMC Hours on the associated Order should be updated as:
Remaining AMC = Total AMC Hours – Total Time Worked
We implemented a Business Rule on the Case table (After Insert/Update, condition: state changes to Closed).
Example:
- Total AMC Hours on the Order = 20
- Time Worked entered before closure = 5 hours
- Remaining AMC Hours becomes 20 – 5 = 15
This works correctly on initial closure. @Ankur Bawiskar
Issue:
If a user revisits the Case after it is already closed and updates the Time Worked value (e.g., from 5 to 10 hours), the Remaining AMC Hours on the Order does not automatically recalculate to reflect the updated time (expected: 20 – 10 = 10).
We need guidance on how to modify the existing Business Rule script so that any update to Time Worked—even after the Case is closed—automatically recalculates and updates the Remaining AMC Hours accordingly.
Can someone please assist with the correct approach?
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
your current BR will run only once when State Changes To Closed
Update the BR condition as this state [IS] Closed
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
@Ankur Bawiskar its already in state changes to closed, but missed that to update in the question in community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
@Ankur Bawiskar its not working as expected for last requirement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
which BR is not working?
1 BR is on Case and 1 is on other table? which other table
share that BR config screenshots
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
