UI Builder Event Handler Condition - Advanced > "Conditionally"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2023 02:12 PM - edited 03-01-2023 02:14 PM
***I also have this in the Next Experience forum with no response so adding it here for more visibility***
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
Thanks, Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2023 05:53 AM
I've not used it but there is a workaround if you didn't find a solution for this.
Create a client script and check the condition there. You can access the event payload in client script like below. And then if the condition satisfies then trigger your event from script.
const fieldName = api.event.payload.fieldName;
If(fieldName == "VALUE"){
api.emit("YOUR_EVENT_NAME", { "paramOne" : "PASS_VALUE_HERE"});
}
//In your case you'd pass fieldName, value and displayValue params for your event.
ServiceNow Community Rising Star 2022/2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2023 06:31 AM
Hi Jagjeet, I appreciate the reply. I have a meeting with HI today to explain why this is not documented and will update the thread here. In the meantime, I will try the above script and see if I can get it to provide the results I need. Always good to have options.
Once again thanks, Jim!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2023 11:49 AM
This was actually solved using - https://docs.servicenow.com/bundle/sandiego-application-development/page/administer/ui-builder/task/...
These are the formulas that the Event Handler Condition expects.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 08:25 AM - edited 02-12-2025 09:49 AM
Hey @cagg , how did you solve this exactly, can you give an example?
I tried it using formulas