Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Business Rule Condition Script Evaluated Even When Filter Conditions Are Not Met?

gurralanavi
Tera Contributor

Hi All,

I have a Business Rule on sc_task with filter conditions for only two specific catalog items.

I noticed that an update on a task belonging to a different catalog item was still triggering the Condition script. To test, I added:

gs.log('Condition evaluated for ' + current.number);

and I can see the log being generated even when the record does not meet the filter conditions.

My understanding was that the execution order is:

Filter Conditions
→ Condition
→ Script

So I'm wondering:

Why is the Condition script being evaluated when the record does not satisfy the filter conditions? Is this expected behavior in ServiceNow?

Thanks in advance for any insights.

1 REPLY 1

annb19
Tera Contributor

Hi @gurralanavi ,
According to the document below, Filter Conditions and Advanced Condition scripts in ServiceNow are evaluated simultaneously, so seeing your log fire even when the record doesn’t match the filter is expected behavior.
Classic Business rules • Australia Build workflows • Docs | ServiceNow