Filter by User And Topic

Hi there - in my app, I'm looking to have a data slice that will show a user rows specific to them, based of topics they've been assigned.

My tables:

Content - has a Content Name column and a Topic column

Responsibilities - has a Topic column and Responsible column (email).

I have the below filter on a slice for my Content table, but it's only filtering by Topic in the responsible table ie. if the topic is there, it will show in the results, and doesn't also filter by the email address assigned to that topic.

I tested this by adding a topic to the Responsibilities table, without assigning it to anyone, and the Content rows with that topic became visible.

This is my filter for my Content slice:

ISNOTBLANK(
        FILTER(
        "Responsibilities",
        AND(
            IN(
               USEREMAIL(),
               Responsibilities[Responsible]),
            IN(
               [_THISROW].[Topic],
               Responsibilities[Topic])
            )
        )
)

 

0 2 49
2 REPLIES 2

First, this: https://community.appsheet.com/t/referencing-a-column-value-in-a-table-versus-referencing-all-column...

Second, your whole slice expression strategy could be better. Each Content record has a [topic]. You can generate a list of topics that a user is responsible for with a SELECT on the Responsibilities table. Compare the two with IN().

And, in case you're unfamiliar with the role of a slice's Row filter expression: The expression is evaluated separately for each row--i.e., the expression should not return the list of rows you want in the slice but rather just evaluate to true or false for each row in the table.

Top Labels in this Space