I have this requirement where at manager approval the form should have approve button for two task of the form .when its for approval(cons!TM_APPROVAL_TASK)) and assignment(cons!TM_ASSIGNMENT_TASK,)
here is the code :
local!isAnalystTeam:isusermemberofgroup(loggedInUser(),cons!TM_GROUPS_ANALYST_TEAM), local!isManagerteam: isusermemberofgroup(loggedInUser(), cons!NTD_GROUPS_MANAGER_TEAM), with( local!approveText: if( and(local!isManagerTeam,or(cons!TM_ASSIGNMENT_TASK,cons!TM_APPROVAL_TASK)), cons!TM_BUTTON_APPROVE, if( local!isAnalystTeam,cons!TM_BUTTON_ESCALATE,cons!TM_BUTTON_APPROVE)),
. Manager group is also part of the analyst group.when ever i am trying , its giving the escalate button instead of approve.
Discussion posts and replies are publicly visible
It would seem the below code that is the first part of your local!approveText is returning FALSE.
and( local!isManagerTeam, or( cons!TM_ASSIGNMENT_TASK, cons!TM_APPROVAL_TASK ) )
So either local!isManagerTeam is FALSE or both the cons!TM_ASSIGNMENT_TASK and cons!TM_APPROVAL_TASK are FALSE. Can you split these three elements out in your interface to see what values they hold individually?
Thanks for quick response.
Yes the value for constants is coming false so i tried with rule inputs and passed as parameter. Its still not working
So local!isManagerTeam is TRUE and both cons!TM_ASSIGNMENT_TASK and cons!TM_APPROVAL_TASK are FALSE?
And then you changed cons!TM_ASSIGNMENT_TASK and cons!TM_APPROVAL_TASK to be rule inputs and it's still not working?
Can you provide your new code?
Local!isAnalystTeam:isusermemberofgroup(loggedInUser(),cons!TM_GROUPS_VALIDATION_TEAM), local!isManagerteam: isusermemberofgroup(loggedInUser(), cons!TM_GROUPS_MANAGER_TEAM), with( local!approveText: if(
and(ri!taskType=cons!TM_ASSIGNMENT_TASK,local!isManagerteam), cons!TM_BUTTON_APPROVE, if( local!isValidationTeam,cons!TM_BUTTON_ESCALATE,cons!TM_BUTTON_APPROVE)),
What does ri!taskType=cons!TM_ASSIGNMENT_TASK return?
It returns text value. now when i pass it in process it gives error 'rule has 11 parameters but only 10 are passed, though i have passed pv for taskType