Serializing a field

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
mozum
Posts: 4
Joined: March 30th, 2016, 8:21 am

Serializing a field

Post 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.
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Serializing a field

Post by htuser »

Hi Mozum,
Please consider using autoincrement item.
Auto_increment.jpg
Auto_increment.jpg (48.24 KiB) Viewed 4953 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,
G.VOLNY, a CSProuser from Haiti, since 2004
mozum
Posts: 4
Joined: March 30th, 2016, 8:21 am

Re: Serializing a field

Post 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.
savy
Posts: 159
Joined: December 27th, 2012, 1:36 pm

Re: Serializing a field

Post 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
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Serializing a field

Post 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.
Post Reply