Row number resets on applying table security filter

Hello, I am currently working on developing app to track sales leads of our employee and facing issues with security filters.
I use table “Visits” that has key id column [Visit ID]. I use a combination of row number and year to generate unique [Visit ID]. This below expression used as initial value"
I am trying to limit the records visible to our employee based on useremail() and have added a separate column [User Email].Currently there are 14 rows in the table and next row number will be 15.


When no security filters are applied, my initial value is shown “SV-2020-00015”.
However, when I apply the security filter based on useremail() and use a different login id to create my first record in “Visits” table, the initial value is displayed as “SV-2020-00001” instead of “SV-2020-00015”.

How can i make sure that i have a running unqiue id value when security filter are applied?

What happens when 2 users try to create a record at the same time? That’s the reason we don’t advise using sequential values in key columns.


@LeventK Thank you for the info.

I have now added the initials of employee to the unique id ( i.e. SV-2020-GA-00001 instead of SV-2020-00001). This way when 2 users can add record at same time without conflict. I am testing it from multiple accounts/devices and checking out for issues, if any.

1 Like

Excellent. Post us back provided you encounter any problems.