Security Filter: Only the last row

I have a table with 4 columns:

ID
Text
UserEmail
DateTime

I would like to set up a Security Filter to only show the latest row one User has added.
What I can do is:
[UserEmail]=USEREMAIL()

But I would like to do someting like:
[ID]=MAXROW(“TableName”,“DateTime”)
But this brings an Error:
Table has an invalid security filter. The filter expression cannot reference the table being filtered.

I could use a Slice, but for some reasons this is not working. It seems that the Slice is not “updated” immediately but after Syncing. But I need it for Formatting Rules immediately after creating the row.

0 3 461
3 REPLIES 3

EDIT: Nope. The below suggestion will not work in a security filter. See posts below.

I think you might be able to do this:

IN(TableName[ID], LIST(MAXROW(“TableName”, “DateTime”, (UserEmail]=USEREMAIL()))))

and I think you can simplify to:

[ID]= MAXROW(“TableName”, “DateTime”, (UserEmail]=USEREMAIL()))

Scratch that. I didn’t go far enough in my testing. I get the same error you did. I’ll try again!

Ok, thinking on this, I don’t think it can be directly in the Security Filter. The limitation is that you cannot reference the table you are filtering in your filter expression.

Since the only way to get the maximum row or max column value is through lists and the creation of these lists requires a reference to the table, there logically cannot be a way “directly” in the security filter to do this.

A way around this might be to record/update the max values in ANOTHER table that you can reference in the security filter. But I don’t know if with your timing requirement, that’ll work either.

Top Labels in this Space