Custom Serial Number Create

I am trying to make an app for myself.

1st Question
here is a column for serial numbers. I used the formula “count(select(sales[Sales No],True))” for adding new serial. But when two-person go to add a new entry at the same time, The serial comes the same and makes it duplicate. How to defend it.

2nd Questions
I want to create the serial by first two letters from username or usermail & last 3 digits from the count result of today new added.


User name -1--
User name -2--

first entry serial – eo001
2nd entry serial – ro002
3rd entry serial – ro003

first entry serial – ro001
2nd entry serial – eo002
3rd entry serial – eo003

(Note: Every day the serial will start from 001)