Triggering Business Rule on Variable Value Change at RITM

zee15
Tera Contributor

I'm trying to trigger a Business Rule when a catalog variable's value changes at RITM level.

Here's the scenario:

I have a choice-type variable named Request Type with three options. I want the Business Rule to execute only when the value of this variable changes.

 

However, while setting up the condition, I’m not seeing the "changes" operator available for this variable.

zee15_0-1747665437865.png

 

But when I select a standard field like Stage, the "changes" condition is available.

zee15_1-1747665631428.png

I also use the current & previous method in the script, but it didn't work. It was showing the same value for both.

zee15_2-1747665999458.png

 

var previousValue = previous.variables.type_of_request;
var currentValue = current.variables.type_of_request;
 

Can someone please advise on how I can achieve this use case for a variable? Any guidance would be much appreciated.

Thanks in advance!

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@zee15 

it's not available there, use this in condition field of business rule

current.variables.type_of_request.changes()

it has worked in the past

Business rule condition - Variable value changes 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@zee15 

it's not available there, use this in condition field of business rule

current.variables.type_of_request.changes()

it has worked in the past

Business rule condition - Variable value changes 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@zee15 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader