Count number of items on a Request

Mickey_Cegon
Tera Expert

I want to try something, and not sure what the best approach would be. Today, we have all approvals for catalog items on the item level. But, we have complaints on the fact that approvers get many approvals for one Request.The current process auto-approves all requests, and requires the individual items to go to our Asset area first, to select the appropriate approver per item, and validate the cost.

 

So, my thought is this:

 

If a catalog request is submitted, and there is only one item on the request, then it just auto-approves the Request, and the approval goes to the item level(current process). If the number of items on the request is greater than one, then the request workflow handles the approval. So, I wanted a way to count the # of items, and put it as an integer on the Request form, so that the Request workflow can use this in an If statement. If count is greater than 1, then the Request moves to our asset team to determine the Request Approver, and get the cost of the individual items documented. Once the Request approval is processed, then the approvals cascade down to the item level, and our item workflow can continue.

 

Does this sound do-able? Do I have a script on the cart, or on Insert of the Request?

 

Thanks!

 

Mickey Cegon

FBL Financial Group, Inc.

6 REPLIES 6

He Mickey,



From what i understand, you've been able to add a condition for an approval on your request form if items are more than one.



To cascade the approvals to request items in this case, you can use the newly created field on the sc_request table.



Simply put an IF condition before Approval activity in your request item workflow. Check if "request.u_req_item_count > 1" (put your field name here). If Yes, auto-approve RITM if No send it for an approval.



Hope that helps.



Thanks,


Mandar


d_cammack
Tera Guru

Hi Mickey,


I would almost suggest an easier approach by turning off the OOB approval notification and replacing it with simply a link to the "My Approvals" page when the request is submitted.   I would not want to take away a managers' option to reject an item from a list in a single request.   If they get a single request to approve, and there are multiple items included in the approval, there will bound to be times when they will not want a single item included if it costs too much or is not necessary to do a particular job.   .  



Thanks,
David