How to generate an auto number which comprises of alphabets and numbers?

0
I need to generate an auto number for flight numbers when I schedule a flight for booking. Need to know how I can generate an auto number with alphabets (mostly airline name /company name) and numbers together.
asked
1 answers
1

Hi Nishana, 

One way to solve this wold be to have 3 attributes on your entity.

1. AirlineName (String) → This can be set to whatever airline you wish to book flight for. You can set the value any number of ways

2. AutoNumber (AutoNumber) → This is self explanatory. Incremented number for each record created

3. FlightNumber (String) → You end up combing the first 2 attributes in this attribute. Something like this →  $Entity/AirlineName + '-' + toString($Entity/AutoNumber)   ….. So your end result is something like Delta-1, Delta-2, Delta-3, etc etc

Just one way of approaching this. Not entirely clear on what your use case is here but just something to get your wheels turning. 

**You might also not need attribute #1 if you are selecting from an airline from a list. But again, just depends on your use case

Thanks,

Micah

 

answered