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"
CONCATENATE(โ€œSV-โ€,YEAR(TODAY()),"-0000",[_RowNumber]-1)
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.
SV-2020-00001
SV-2020-00002
โ€ฆ
SV-2020-00014

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?

0 3 283
3 REPLIES 3

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.

Excellent. Post us back provided you encounter any problems.

Top Labels in this Space