Hide data based off information from a different table

Hi,

I have two tables in my app. One app contains a list of names, pending trainings, and wether the trainings are complete or not complete. Each training is on a separate line item so its possible for a person in the name column to have several entries.

I have another table that contains names and a bunch of sales data. I would like to hide the sales data entries if the person has any training entries from the other table that are in a Not complete status.

NOT([STATUS] = “COMPLETE”)

First, you need a way to identify rows in the first table (I’ll call it Training Table) that correspond to the current user. I’ll assume there’s a column in Training Table named Email that contains the email of the user the row’s about, such that this expression would evaluate to TRUE for a row belonging to the current user:

([Email] = USEREMAIL())

You can the get a list of rows in Training Table for the current user with:

FILTER(
  "Training Table",
  ([Email] = USEREMAIL())
)

You can get a list of rows in Training Table for the current user that indicate an incomplete status with:

FILTER(
  "Training Table",
  AND(
    ([Email] = USEREMAIL()),
    NOT([STATUS] = “COMPLETE”)
  )
)

If that list of rows is empty (blank), the user has no incomplete trainings:

ISBLANK(
  FILTER(
    "Training Table",
    AND(
      ([Email] = USEREMAIL()),
      NOT([STATUS] = “COMPLETE”)
    )
  )
)

Conversely, if the list is not blank, the user has at least one incomplete training:

ISNOTBLANK(
  FILTER(
    "Training Table",
    AND(
      ([Email] = USEREMAIL()),
      NOT([STATUS] = “COMPLETE”)
    )
  )
)

If by “hide the sales data entries”, you mean you want to hide the view (e.g., a deck or table view) that presents the sales data entries to the user, use the ISBLANK(...) expression from above in the view’s Show if property:

See also:





1 Like

I dont think this works actually. Im trying to put this in ?Show field under columns for a specific field on a table. It still shows the user everything though when they have a trainining in status not complete