hi, can someone help me with an approval workflow?...
# administration
k
hi, can someone help me with an approval workflow? I need to make it so the current user can't be the next approver? Currently, my next approver list is a list of employee
m
Are you using basic approvals? Suite Approvals? or building your own workflow?
k
building my own
m
And are you setting the next approver value via a Set Field value action?
k
yes
m
what is the logic you are using to set the value?
k
right now, the set field action is user.supverisor
its working, but it needs to be able to change it, so the user can set the next approver to themself
m
I thought you said in your original question that the next approver CANNOT be the current user?
k
yes, im trying to edit the workflow so they can't select themself as the next approver
m
oh i see
k
right now, they can
m
But they do need to be able to select a next approver manually? Just not themselves?
k
yes, thats correct
m
For this you can do 1 of 2 things
1. Create a new custom field called "next approver" (or whatever you want) and add filtering to this field of is NOT current user. Then hide/disable the native next approver field and use a workflow action to copy the custom next approver value into the native next approver value 2. Use a Return User Error action on Before Field Edit, that says "You cannot select yourself as the next approver". When the user selects themself in the next approver field. THen also do another Return user Error action on Before Submit with the same conditions. This will provide a pop up error when they select themselves and also prevent the record from saving if they still try to save it with themslevs as the next approver
Personally I prefer the second option, while it's not ideal, sometimes the first option creates an out of sync between the 2 fields in very rare cases
The root problem is that you cannot apply custom filtering to native list/record fields
k
thank you, let me try it and let you know
@MGBC It worked, thank you,