OmeLuuk
18th September 2012, 16:02
This is what std_gen tells me: (ERPLN) Warning: 4GL-FUNCTION 'execute' not allowed in section 'when.field.changes'

This is what I want to achieve:
A (dynamic) formfield will be filled by a barcode scanner which fills in an (EAN) number followed by "tab". As soon as the scanned code is entered (last field of the form) the (default) button cont.process must be executed.

To avoid possible redundancy it is not allowed to use execute(cont.process) here. Where there acceptable alternatives? Which?

OmeLuuk
18th September 2012, 16:14
Oops, should have been posted in "Tools Development", will any moderator move my post?

mark_h
18th September 2012, 16:28
Moved as requested.

My solution was not very good, but it worked for us. I put a continue button on the form. After the last field followed by the tab, the focus moved to the continue button. Then I put a barcode on the tag that sais process(or something like that) and when the user scanned it, it did a return. This ran the choice.continue button. So the tag contained 7 or 8 fields of data and a continue bar code. The user could just scan one barcode at a time. They could fly thru a stack of tags in minutes - never even looking at the screen.

OmeLuuk
18th September 2012, 16:32
Thanks for the move and the option. I have been thinking of it too, but I assumed there also was a nice "automated" way. In your solution an intermediate barcode needs to be scanned.

baan_guru
18th September 2012, 18:14
Hi,

Program your Barcode scanner to append "TAB" after each scan (this is supported by all major Barcode scanner), in 'after.field' section of barcode field you can call any function or standard button using execute(any std option) function.

shah_bs
18th September 2012, 18:26
I have not confirmed this, but maybe you can give it a try:
- in the when.field.changes, call a function
- in the called function, say execute
The warning should go away.

On the other hand, it is just a warning message, it will work, and depending on situation of your company policy about such way of making code changes, you could choose to make the change as you first planned.

OmeLuuk
19th September 2012, 09:27
... in 'after.field' section of barcode field you can call any function or standard button using execute(any std option) function.

d:\infor\bse\bin\std_gen -z -s pmyownprog0
pmyownprog0( 426): Warning: 4GL-FUNCTION 'execute' not allowed in section 'after.field'
Although I assumed it would be there somewhere.

OmeLuuk
19th September 2012, 09:39
I have not confirmed this, ... - in the called function, say execute
The warning should go away.
Confirmed. Anyway because of the high volume scanning I would rather not run into the risk of recursion. Thanks for the option. I will use this one.