Auto-Increment on VLWeb?

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
zigzigzig
Posts: 10
Joined: Tue May 30, 2017 11:31 pm

Auto-Increment on VLWeb?

Post by zigzigzig »

Hello all,

I'm attempting to auto-increment a numeric field in VLWEB - I've tried to use a system variable ie '*AUTONUM___' as a default value for the field itself, but it appears this use of a system variable is not available in VLWEB. I'm interested in finding out how other people are implementing autonum-type logic in their VLWEB applications.

Thanks,
- z
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: Auto-Increment on VLWeb?

Post by jyoung »

Are you trying to use it on a web page or in a web component?
That will cause the "Not Supported on the Web" error. The reason being the *AUTONUM variables call a program that reads, increments and updates a data area. http://docs.lansa.com/14/en/lansa013/in ... 4_0110.htm

Therefore you need to set them in a server routine.

Code: Select all

srvroutine name(GetNumber)
field_map for(*OUTPUT) field(#wk_Packed) parameter_name(Number)
#wk_Packed := *AUTONUM15EVENTNUM
endroutine
Post Reply