260
Views
4
Comments
Solved
Auto increament value

Hi @all,

I am developing an eshop app in mobile web.

And here I have created the CategoryDetail screen and its attibutes.

I wants the code attribute to be auto increament.

Database is in local storage.

I have attached the .oml but its not working .

See the CategoryDetail screen.

Please do guide me.

Shopify.oml
2020-11-13 07-48-15
Khuong Truong
Solution

Hi,

I think Is AutoNumber just for server entity only except identifier.

So in my opinions, we can update the Code datatype to Integer. Then Add a client action to get New Code by adding 1 (or whatever number) to the last Code value.



I updated your .oml as well.

Cheers,

Khuong

Shopify1.oml
2019-12-06 08-26-53
Jorge Rodrigues

Hello,

I think that in the database when defining the attribute you have to put the 'Is Auto Number'.

Regards,

Jorge Rodrigues

2020-11-13 07-48-15
Khuong Truong
Solution

Hi,

I think Is AutoNumber just for server entity only except identifier.

So in my opinions, we can update the Code datatype to Integer. Then Add a client action to get New Code by adding 1 (or whatever number) to the last Code value.



I updated your .oml as well.

Cheers,

Khuong

Shopify1.oml
2026-01-15 03-18-59
Vijay Malviya

Hi 

You either change the column of the table as per the instructions given above or always insert the numeric value in that column then take its max and always insert it plus 1 in it.

Thanks


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