If requested for is group manager then the RITM should auto approve

srikanthr066535
Tera Contributor

There is a group variable in Catalog form,If requested for is group manager of the selected group  then the RITM should auto approve else it should go to requested for manager

4 REPLIES 4

Brian Lancaster
Tera Sage

Sounds like you just need to do an if to check if the requested for is equal to the current.variables.[your variable name].manager.

shun6
Giga Sage

Hi @srikanthr066535 ,

Put "If" flow logic and set condition like this. 

When condition met, don't put "ask for approval" action and proceed next action.

This is not "auto approve" you mentioned but you can skip approval step.

*u_group is a variavle which references Group table.  

shun6_0-1748356931063.pngshun6_1-1748356991077.png

 

Thanks.

Want to use workflow

You would just use an If in workflow with code like this. You should really think about transitioning to flow as I'm sure workflow will eventually be not supported.

answer = ifScript();

function ifScript() {
	var reqForMgr = current.request.requested_for.manager;
	var openedBy = current.request.opened_by;
    if (reqForMgr == openedBy) {
        return 'yes';
    }
    return 'no';
}