Custom auto-number in outsystems
Application Type
Reactive

I need to make a unique registration number per student, with the prefix of the year that the form was submitted. 

It should work in the format "210000000", "210000001", "210000002", but im not quite sure as to how to implement that feature in outsystems, because i have tried to implement that feature making a sum with the studentId, but thats not possible. I am quite new to the platform, sorry for the simple doubt.

Here's the calc of RegistrationNumber:

(TextToInteger(Substr(IntegerToText(Year(CurrDate())),2,2))*10000000)+IdentifierToInteger(CreateStudent.Id)

I didn't test it, but it should something like this.

Thank you very much José, I triend implementing this logic, and after fixing some errors it worked! 

Solution

Hello Thiago R,

Do you wan the Custom Number like this as mention in the below snap.

1) You select the year from the dropdown list based on that it will start generating custom number.

2) click on the Generate button will generate the number by adding the selected year.



also i am uploading the .OML file which will help you to under the work process. 


Kindly let me know the feedback on this,


Thanks 

Ajay Sharma

CustomeNumber.oml

Thank you very much Ajay, your example was great. I implement it in my application! Thanks!

Thiago, firstly you should insert the record without the number, then calculate the number and after it update the record.

Here's the calc of RegistrationNumber:

(TextToInteger(Substr(IntegerToText(Year(CurrDate())),2,2))*10000000)+IdentifierToInteger(CreateStudent.Id)

I didn't test it, but it should something like this.

Thank you very much José, I triend implementing this logic, and after fixing some errors it worked! 

Solution

Hello Thiago R,

Do you wan the Custom Number like this as mention in the below snap.

1) You select the year from the dropdown list based on that it will start generating custom number.

2) click on the Generate button will generate the number by adding the selected year.



also i am uploading the .OML file which will help you to under the work process. 


Kindly let me know the feedback on this,


Thanks 

Ajay Sharma

CustomeNumber.oml

Thank you very much Ajay, your example was great. I implement it in my application! Thanks!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.