spartacus
20th December 2002, 11:36
How can I set the input cursor to a certain field, after I executed a form command ? We tried "to.field()" but that is only in after.display() sections possible

Thanks
Spartacus

NPRao
20th December 2002, 14:42
spartacus,

Can you please put the baan/os/database info in your profile?

Assuming you are on the BaaN 5/ERP series, you might try to use the standard function - to.group() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_form_and_form_field_operations_to_group) and if that field is the first one in that group then the control would transfer to it.

Just an idea... ;)

pellus
13th April 2006, 12:06
Hello all,

Found this old thread with a good title. Didn't solve my problem though I thougt it would.
Env: SSA LN6.1 SP2 on Ms-sql on Windows.
Problem:
I have a maintain session on whinh312, form type 1 . On the form I have also a barcode input field. After scanning the barcode, I find by programming the relevant whinh312-record. No problem so far. Then I call a form command that does a lot with the maintable record and other tables. No problem so far. Then it is time to scan a new barcode.For doing this , the focus shud be on the barcode field.

The barcode field is the first field in group X.
I try ending my form command function with to.group(X) but focus has not transfrred to the barcode input field. (And the manual talks only about making the form current, not the field, so why should it work).

to.field can not be used because it is not in after.input or similar.

Is there some standard command I can use to transfer the focus? Applicable after having performed a form command function.

I guess this is a pretty common problem. What do you say?

qcng00
21st June 2006, 05:35
Hi,

I had the same problem.
Call execute(modify.set) at the end of the form command function will work.

Ng Quee Chee

NPRao
21st June 2006, 20:42
Is there some standard command I can use to transfer the focus? Applicable after having performed a form command function.

Pellus, please post your code for clarification.

I found a function from the BaaN-IV manual which you can try to use:
INPUT With the INPUT function it is possible to force input on a specific input field or `input alone' field on the form. For input alone fields this is the only way to enter data in such a field. The argument field can be the name of the field (a string) or the field number. For example INPUT("input.field") or INPUT(4). Before entering data the current form status and the current field are saved, which are restored after the input. So there is no danger of disordering the execution of the standard program. USE The function INPUT can be called at any moment in the script, except in the section `before.program', because during this section there is no form read. 242 input.again