Hi,
I have a gallery that I am trying to filter with different items depending on different scenarios but I can't quite get it to work correctly.
There is a variable called varAdmin that is set on start, and if that is True, I want the gallery to filter a column in SP called Phase where it is either Phase 1, 2, 3, 4, or 5, and the Status is NOT Rejected.
If varAdmin is False, it then needs to check if the User created the Items, and filter the gallery where the Created By column is the user logged in and the Phase column equals Phase 1 or 3, and the Status is NOT Rejected
The final scenario is where the current user is listed in a column called Manager and the Phase equals 1 and the status does NOT equal Rejected.
Below is my current formula but it doesn't seem to work correctly, any ideas?
If(varAdmin,
Filter(colAllItems,Phase="Phase 1"|| Phase="Phase 2"||Phase="Phase 3"||Phase="Phase 4"||Phase="Phase 5" && Status <> "Rejected"),
If(!varAdmin,
If(!IsBlank(LookUp(colAllItems, ('Created By'.Email = User().Email))),
Filter(colAllItems, ('Created By'.Email = User().Email)&& (Phase="Phase 1" || Phase = "Phase 3") && (Status <> "Rejected")),
Filter(colAllItems, (Manager = User().Email) && (Phase="Phase 1") && (Status <> "Rejected")))))