Business rule in servicenow , if in sc task table i put the query and search if any task…
- User
Business rule in servicenow , if in sc task table i put the query and search if any task whose short description is 123 and state is closed complete or incomplete found then return true
- Assistant
- User
But count of tasks is greater than 2 not for the first 2 created task
- Assistant
If you want the business rule to return
trueonly if there are more than two tasks that match the given criteria, you can adjust the script to count the matching tasks. Here’s how you can modify the script:-
Script Adjustment:
You need to iterate through the result set and count the records. Then, return
trueif the count exceeds 2.
-
- User
Query is requested item sys id of the task and then tasks will come. And not required for 1st 2 tasks and check after 2nd task till the task with short description 123 come and closed complete
- Assistant
- User
While gr.next()
- Assistant
- User
If in query records for a table short description of any record found that contains isg approval and state closed complete then return false
- Assistant