Hello everyone. First of all I want to thank you for your help.
I have a field where I write down a consecutive serial number.
For each user this serial number starts with a different number. Example:
User 1: 242501001
User 2: 242502001
User 3: 242503001
How can I do so that, depending on the user and their specific serial number, I can add a consecutive number?
For example:
242501001 +1
242502001 +1
Thanks in advance
Hi,
you can test
max(users[serial])+1000
@Mantenimiento_S wrote:
How can I do so that, depending on the user and their specific serial number, I can add a consecutive number?
One method:
1. Directly into the Initial Value field of the key column:
SWITCH(
USEREMAIL(),
"USEREMAIL@1.COM", 24250100 + (YourSerialExpressionHere),
"USEREMAIL@2.COM", 24250200 + (YourSerialExpressionHere),
"USEREMAIL@3.COM", 24250300 + (YourSerialExpressionHere),
24260000 + (DefaultSerialExpression) ## This is an example, change it to fit your use case
)
Hi. Thank you very much for your question. I have a question. If a user with 3 records for example, 242501001, 242501002, 242501003, etc... hoy can I get the last record of each user to add 1 more number to be correlative?.
Thanks in advance.
This?
(
MAX(
SELECT(
table[serial-number],
(USEREMAIL() = [email])
)
+ LIST(initial-number - 1)
)
+ 1
)
Replace table, serial-number, email, and initial-number as appropriate.
2. Using a User table + each table has a user_email or similar field + the User table has a key value = to the user email:
[user_email].[key_range] + (YourSerialExpressionHere)
# Assuming you have a [key_range] field in which you assign the corresponding
# number base, like 24250100, 24250200, 24250300
User | Count |
---|---|
18 | |
14 | |
11 | |
7 | |
4 |