Filter to show approvals that where not approved by the designated approver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hi community
I want to run a flow on the approval table that shows if an approver record was approved by someone different than the actuall approver.
I was going to use a comparision at the condition of the trigger
Where Approver.Email is different to Approval.Updated By
but it is not allowing me to.
Can anyone help please?
I have tried this in my developer instance on AUstralia.
Thank you all
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
In most approval flows you can’t compare fields like Approver directly.Email and Approval.Updated By in the trigger condition as they are different record contexts. The workaround is to capture the approver’s email into a variable or field during the process, then use a decision step or condition action to check if it differs from the Updated By value, this way you can flag when someone other than the assigned approver completes the record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
We can't use that condition what you have mentioned directly in the trigger condition.
Instead try the following approach,
1.Take one flow variable of type true or false and check all the conditions like whether the approval record state changes to approved or not ,and the approval email is different from updated by .Based on that set the Flow Variable to true or false
2.Use the following script to set flow variable,
var changedFields=fd_data.trigger.changed_fields;
var result = changedFields.find(obj => obj.field_name == "state");
if(result){
if(result.previous_value!='approved' && result.current_value=='approved' && fd_data.trigger.current.sys_updated_by!=fd_data.trigger.current.approver.email){
return true;
}
}
return false;
If you found my response resolves your question, mark it as helpful and accept the solution.
Thanks,
Dinesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
I tried this, can you try this?
Approver.User ID [IS DIFFERENT FROM] Updated By AND State [Changes To] Approved
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader