Hello
i want to create a unique code using the date and the food fields as below. The code would begin with AB, then it would take the day and month part of the date for example 0204 for 02/04/2021, then it would take the last 3 characters of the food field and then it would have a - followed by record count for that date and food (as there are 3 bread on 02/04/21 then the 3 records would end with a 1,2 and 3).
Date | Food | Code |
2/4/2021 | Bread | AB0204EAD-1 |
2/4/2021 | Bread | AB0204EAD-2 |
2/4/2021 | Bread | AB0204EAD-3 |
2/4/2021 | Bread | AB0204EAD-4 |
2/8/2021 | Eggs | AB0208GGS-1 |
2/8/2021 | Eggs | AB0208GGS-2 |
3/18/2021 | Milk | AB0318ILK-1 |
3/18/2021 | Milk | AB0318ILK-2 |
Solved! Go to Solution.
Hi @Sammy22
Here is a way of doing this:
If the provided answer helped you to solve the problem/was correct, please accept it as a solution :)
Thanks.