Define field value based on last value of a table on a database

QuestionsDefine field value based on last value of a table on a database
Andre asked 7 years ago

Hello,

I have a table where it has a sequential number used for requests (like 100100, 100101, 100102, 100103 and so forth). That's the field request number. I would like to set the request_number field/column of the grid based on the last entry of the table. Say the last entry is 100103, when the user add a new entry (row) the request_number field/column would be automatically set to 100104.

Thanks,

Andre

1 Answers
Abu Ghufran answered 7 years ago

Hello,

Default values are set on client side once grid loaded, so you probably need to set this value on server side.
You can use on_insert event and write code to set this seq number when insert is made.

Custom events feature is currently part of licensed version.

Your Answer

13 + 12 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?