Skip to main content
Solved

Limit Requests primary list by department of current user

  • 4 September 2024
  • 6 replies
  • 48 views

jhouser
Captain II
Forum|alt.badge.img+1

I need to limit Requests view so employees can see their own Requests or those of employees in their department (field on Request). 

I can easily limit users to their own requests using RQRequests.CreatedByID = @Me in the GI condition. But I need the equivalent of “Or RQRequests.DepartmentID = @Me” . Problem is, @Me doesn’t work for DepartmentID field. 

Does anyone know how I can accomplish this?

Best answer by jhouser

I don’t think filtering by current users’ department is possible, but I found we can do it by workgroup (company tree). They’ll just have to build out company tree to match departments I think. Below is GI condition that worked:

 

 

View original
Did this topic help you find an answer to your question?

6 replies

nhatnghetinh
Captain II
Forum|alt.badge.img+10
  • Captain II
  • 395 replies
  • September 5, 2024

You need to join PX.Objects.EP.EPEmployee and create RELATIONS & CONDITIONS as shown in the screenshots below.

 

 

 

Best Regards,

NNT


jhouser
Captain II
Forum|alt.badge.img+1
  • Author
  • Captain II
  • 103 replies
  • September 5, 2024

@nhatnghetinh Thanks for the response. I don’t think this will work though. For the Employee join (and in turn Department condition), employee is the requestor. But I need user who is not requestor to see Requests if they are in the same department. 

For example, Jane Doe in FINANCE department submits a request. I am not Jane Doe, but I am in FINANCE department. When I log in, I need to see her requests. 

Your join would essentially be Jane = Jane, and in turn the condition would be “Department on Request = Jane’s Department”. My department (as user logged in) is nowhere in the equation, and that’s the variable I’m trying to solve. 

Please let me know if I’m missing something. Thanks!


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2657 replies
  • October 2, 2024

Hi @jhouser were you able to find a solution? Thank you!


jhouser
Captain II
Forum|alt.badge.img+1
  • Author
  • Captain II
  • 103 replies
  • October 3, 2024

jhouser
Captain II
Forum|alt.badge.img+1
  • Author
  • Captain II
  • 103 replies
  • Answer
  • October 9, 2024

I don’t think filtering by current users’ department is possible, but I found we can do it by workgroup (company tree). They’ll just have to build out company tree to match departments I think. Below is GI condition that worked:

 

 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2657 replies
  • October 9, 2024

Thank you for sharing your solution with the community @jhouser!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings