Jump to content

Dept Filter for more than 1 dept


This topic is 3081 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have  filter on my home page that show all staff within a particular dept. when the Head of Dept. logs in. This works fine when a staff member belongs to one dept only.

I've now got the situation where a member of staff can belong to 1 or more depts. and I would need both HoD to see the staff member when they log in on the home page.

This is currently working through the use of a calculation (in the staff table) that looks at the fk_DeptCode  and returns the dept code and "SLT" in a list or just SLT depending on it's population.

Going forward, due to the staff member being in two depts, the structure has had to change slightly to account for the many to many relationship. I've created a bridge table StaffDept, which just holds staffed and deptID.

I can't replace my fk_deptcode in the below calculation as it will no longer store it as it's based on a relationship, so my filter breaks. IS there another way around this?

TIA

DeptFilterMatch.png

Link to comment
Share on other sites

Are you able to simplify this?

GroupName - (Text Result - indexed)
fk_DeptCode - (Text Result - indexed)

Change the layout entry of the "fk_DeptCode" to a checkbox based on a value list of all your DeptCodes

Then change your calculation to your above field to:

If(GroupName = "support"; "support", "SLT" & If(not IsEmpty(fk_DeptCode); "¶" & fk_DeptCode)

Go through your staff list and populate which Dept each Staff Mamber belongs to. You can select multiple Depts. Also, since your calculation field is based on INDEXED fields, it will be able to be used in your filter.

Hope this helps.

Link to comment
Share on other sites

This topic is 3081 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.