In an approval workflow, without scripting, is it ...
# general
l
In an approval workflow, without scripting, is it possible for me to store in a PO the approver prior to the approver who has the sufficient limit to approve the PO? Currently, we store the full approver chain in transaction body fields.
m
I don’t understand the question It sounds like at each stage in the approval you want to store who the previous approver was?
l
For example: Approver 1 Limit is 1,000 Approver 2 Limit is 5,000 Approver 3 Limit is 10,000 If the PO amount is 8,000, the approvers should be Approver 2 and then Approver 3. The approvers are the final approver with the sufficient limit and the approver below that.
I'm looking for a way to route the workflow to approver 2 first in my example. The approver below the final approver.
m
Is approver 3 the supervisor of approver 2?
l
We use the Purchase Approver field in the Employee record to define the hierarchy.
m
It might work where you make a saved search of all employees. In the filters add purchase approver as the filter In the results do a summary of Maximum on internal id Then add a field to your transaction that is sourced by this saved search Use Next Approver as the field in the sourcing settings. Uncheck store value
Then you can use this value in workflows to set a field value or even change the next Approver field
l
Sorry for being stupid. I understand the process or steps but I don't understand how I am able to source the approver below the final approver in this case. Thanks btw
m
If you try the steps above can you get the right internal id to show in your non stored field?
That's the first challenge of that works then updating the workflow should be fairly easy
l
Yes. It worked. Thank you. It would be nice though to see the actual name of the approver instead of the internal ID. Do I have to create a separate field to show the approver name as there is no way to attach a summarized saved search to a custom field with type of list/record?
m
ok, so that was just the first step....now what do you want to do with it? Do you want to set this person as the next approver first? Or do you just want to display who that person was somewhere on the transaction so the real approver can see it? Or do you need it in reports?
l
Requirements have changed. I just had to send an email to that approver which I was able to take care of. Yes, it would be nice to see the actual name of that approver and report on it. Do I have to create two more fields? One non-stored value field for the name and then another with store value automatically populated via a workflow?
m
Yes use a workflow to set a stored field using the internal id value from the nonstored field You can set a list record field with a formula using the field id of the non stored field
l
Great! Thanks for your help.
I've just realized that the custom field populated by a summarized saved search won't work for me because multiple employees may have the same purchase approver. I can't just use the min or max. It must be from the same DOA as the PO raising the PO.