Auto number other than ID, Refresh per Month

Hi, 

I'm looking for help to make auto number like ID but not ID because it can refresh per month to value "1" to the next month. And Max 3 digit per month ex : "003" 

I create this number when the form is saved.

Is there any solution? 

Thanks

Hi Ayu,


From what I know, you have to do that manually before create. IsAutoNumber has a fixed increment from what I know and can't be configured, while Default requires a static value.


Hope this helps!

- Emman

Emman Si wrote:

Hi Ayu,


From what I know, you have to do that manually before create. IsAutoNumber has a fixed increment from what I know and can't be configured, while Default requires a static value.


Hope this helps!

- Emman

Hi Emman, 

So what can I do? How to i create the auto number but data type not auto number maybe integer. So it can refresh per month


Hi Ayu,

You can use advance SQL for your insert operation instead of entity action. In your insert sql query canculate your monthly autoincrement attribute using a subquery (select maximum number of the column for current month and increment it by one).

Hi Ayu,


My idea is to do it in your DB wrapper for create, you add more actions that will calculate your numbers based from defined logic and parameters.


Hope this helps!

- Emman