Auto-increase INT value

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
MatteoAllix
User
Posts: 117

Auto-increase INT value

Post by MatteoAllix »

Hello,

I use v2018 on Windows 10.
Is there a feature that allows to auto-increase the value of an INT from the last one in the table?

Example:
VALUE IN THE TABLE
Agency Code Description Date
SAM001 Description1 Date1
002 Description2 Date2
003 Description3 Date3
001 Description1 Date1
002 Description2 Date2

When I click the Add Button the new code must be 004.

Thanks,
Matteo.


MatteoAllix
User
Posts: 117

Post by MatteoAllix »

The mask insert my line, but i haven't finisched, sorry.

THIS IS THE CORRECT EXAMPLE:
VALUE IN THE TABLE
Agency Code Description Date
SAM 001 Description1 Date1
SAM 002 Description2 Date2
SAM 003 Description3 Date3
VER 001 Description1 Date1
VER 002 Description2 Date2

Well, when I click the add button:

  • If I select the SAM agency, the new code must be 004
  • If I select the VER agency, the new code must be 003

Matteo.


Webmaster
User
Posts: 9427

Post by Webmaster »

Use the Row_Inserting server event to get the max value from the database and increase by one. Read the help file topic: Server Events and Client Scripts for more details.


Post Reply