Forum Discussion

DirkRuana's avatar
DirkRuana
Qrew Captain
6 years ago

Filter report based on user and field content

Hello:

Working on another challenge.  Just a formula formatting issue:

I have created a report I have created for Accounting Personnel.

If Current User () is Jane Doe.  Display Records for [Service Group] = "West Corridor".

That would be a User formula?  What would the format look like.

I am sure my request are a bit simple and tedious.  But the community help has been impressive!

Thank you,

Dirk
  • I would hate to see it hardcoded like this but to directly answer your question you would make a formula called [Service Group filter]

    Case(User(),
    ToUser("jdoe@mycompany.com"), "West Corridor",
    ToUser("flintstione@mycompany.com"), "East Corridor")

    And the faster on your report would be where the [service group] because the [service group filter]

    But I think a better way to do this would be to have a table of users who need the report filtered where the key field is the user ID. There would be a field on the table for which service group there is relevant to them.

    Then on the table that has the report records there would be a formula field called [current user] with the formula of

    User()

    And make a relationship based on that field and look up the service group filter from that user table. Then as there are changes in the future you anyone can update the table with additional users or changes to the service filter and not have to edit your formula.