26
Views
2
Comments
I want to hide a request to Approver B if Approver A is not yet done with approval
Question

I have this Aggregate called Master that displays all the request for approval per approver level on the Landing Page (Block named RequestList). The requirements is to have only 2 approval levels, I have 3 as this is the only way I know how it would work but I was ask to demote the Approver Level 2 into Approver Level 1 with the condition that this Approver (let's call B) will only see the request on the dashboard if Approver A is done with the approval.

All the other approvers have no dependency and can approve anytime.

*Current code requires all approvers in Level 1 to approve first before Approver Level 2 (Approver B) sees the request on the dashboard.

Is there any way I could do this?
I've have tried manipulating this Aggregate Filter but to no avail.

UserImage.jpg
Md Mansur

Hi @Mikki Axel Dela Cerna

If you want to achieve your Requirement than following Below Step;

point-1 (First check the user role like this:

 

Java Scrip Code:

Create Client Variable and Assign Role In Logic Action


Point 2:  Write Simple Filter like this to Archive your Requirements

If(Client.IsRoleA=True,SR.StatusId=Entities.Status.PendingOfRoleA,If(Client.IsRoleB= True,SR.StatusId=Entities.Status.ApprovedBYRoleA,SR.StatusId=Entities.Status.ApprovedByRoleB))


I have Attached working Oml file so go though this:


Thanks

Md Mansur

ApprovealApp.oml
2024-03-23 18-16-49
Bryan Villalobos

Hi @Mikki Axel Dela Cerna ,

I think the missing piece in your approval is the ApprovalStatus.

I am not sure if you already have it but you can use it in your Dashboard aggregate filter which looks something like this:

Status = PendingApprovalLevel1 and User.Role = ApproverLevel1
or
Status = PendingApprovalLevel2 and User.Role = ApproverLevel2

And in your approval, when ApproverLevel1 approves it, you need to change the status to PendingApprovalLevel2.


Regards,

Bryan

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.