Page 1 of 1

Serializing a field

Posted: May 30th, 2017, 10:01 am
by mozum
can any one help me on how to make a field accept number input serially. For instance if serial number of a preceding record is 3, the field should accept 4 as the next record else error msg should request a re entry as serial number 4.

Re: Serializing a field

Posted: May 30th, 2017, 11:12 am
by htuser
Hi Mozum,
Please consider using autoincrement item.
Auto_increment.jpg
Auto_increment.jpg (48.24 KiB) Viewed 4999 times
For error message, please try visualvalue function with this idea:

Code: Select all

if item value<> visualvalue (previous item value)-1 then 
errmsg();
[/i]

Best regards,

Re: Serializing a field

Posted: May 31st, 2017, 10:51 am
by mozum
Thanks alot for the guide. but I could not access the author increamental field to check it. I try to do so by right clicking on the field and selecting field property. But it display among other items 'sequential' which is unselectable. can I still learn from you how to display this.

Re: Serializing a field

Posted: May 31st, 2017, 6:59 pm
by savy
Only numeric fields are allowed to have autoincrement attribute. Please check your dictionary and make sure that the item is numeric type and not alpha

Re: Serializing a field

Posted: May 31st, 2017, 9:33 pm
by Gregory Martin
Auto increment fields can only be ID fields. If you want to increment a non-ID field, you might consider using the loadsetting/savesetting function to store the value associated with the previously entered case.