Event Handler Condition - Advanced > "Conditionally"

cagg
Tera Guru

Does anyone know what the "Event handler condition" should accept as a condition? There is no documentation I can find on this, all of the docs for event handling stop short of explaining this.

 

What I am looking for is something like this

@payload.fieldName == 'myFieldName' - execute the event.

 

cagg_0-1677686851086.png

 

Thanks, Jim

 

9 REPLIES 9

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hi Jim,

That field is expecting a formula, which you can find a list of here: https://docs.servicenow.com/bundle/sandiego-application-development/page/administer/ui-builder/task/... 

Hi Brad, first off love your YouTube videos. You've helped me more than you know! 

 

So in my example above where I am looking for: @payload.fieldName = 'myFieldName'

 

How would that translate to the formula.

 

[@payload.fieldName][ALL_EQ][myFieldName]   ???

 

I am assuming it would be the "All Equal" formula but I am not clear on the syntax. Going to play around with this a bit but any feedback would be appreciated.

 

cagg_0-1677872089053.png

 

Thanks Again,

 

Jim

 

I actually got this to work using "IF((@payload.fieldName == "myFieldName"), true, false)" in the Event Handler Condition box. Basically if the condition was met it executed the event handler.

 

Brad thanks again for pointing me in the right direction.

 

Jan Zemcak
Tera Contributor

Thanks Jim for your quick answer.