Hi Community,
Introduction:
New assets objects are to be created through automation. Each object has a unique whitelist ID. Before a new assets object can be created, the next free whitelist ID must be found. A whitelist ID is structured as follows: SW-0001, SW-0002, SW-0003, etc.
Problem:
Now my problem is that the automation does not create a correct whitelist ID.
I tried the following lookup by creating a variable:
{{lookupObjects.max(Whiteliste-ID.substringAfter("SW-").asNumber)}}
In the second step, I then calculate with the variable +1:
SW-{{#=}}{{Whitlist}} + 1{{/}}
Question:
I now have the following problem: either the whitelist ID SW-1 or SW- is generated. Is the problem here with the leading zeros? How should I incorporate these into the lookup/calculation?
Thank you in advance for your help!