Is there an equivalent of this in axes?
SETCURSORTOROW(iRow, iColumn)
See: https://docs.lansa.com/15/en/lansa050/i ... 0_0985.htm
Set Cursor to Row
Moderator: jeanmichel
Re: Set Cursor to Row
I dont know about one for the row, column, but you have one to set the 5250cursor in an identified field in the screen.
I would try that approach first.
So if you screen identify for example CPU column caption as CPU and Function column caption as FUNCTION in this wrkactjob scren:
you can add buttons to show the help for the columns with this code in the click action:
or
I would try that approach first.
So if you screen identify for example CPU column caption as CPU and Function column caption as FUNCTION in this wrkactjob scren:
you can add buttons to show the help for the columns with this code in the click action:
Code: Select all
FIELDS("CPU").set5250Cursor();
SENDKEY("F1");Code: Select all
FIELDS("FUNCTION").set5250Cursor();
SENDKEY("F1");-
eduardorama
- Posts: 13
- Joined: 19 Aug 2020, 11:26
Re: Set Cursor to Row
Thanks Dino.
However, the problem is that, the field I'm trying to point to is an 'empty' output field and somehow axes can't recognise it (I can't name it).
So the only thing I can think of is to position the cursor.
However, the problem is that, the field I'm trying to point to is an 'empty' output field and somehow axes can't recognise it (I can't name it).
So the only thing I can think of is to position the cursor.
Re: Set Cursor to Row
Are you trying to capture the value in that output field for the times when is not there? if so this may help.
I had before the need to capture the value in a field, that sometimes was in the screen, sometimes it wasn't. So when the field is in the screen, you identify the screen, identify the field (in my case SALARY) but then in the script before retrieving the value you need to check first if the field exist or not, before doing anything. For example in this test program, depending on the input in the first screen, the second one will have or not the SALARY field. if you go to screen identification, in the case of NO salary, you don't have the field SALARY there.
I added here a Label extension, named it LABEL1 and this script for the OnScreenReady of the LABEL1 to set his value:
I had before the need to capture the value in a field, that sometimes was in the screen, sometimes it wasn't. So when the field is in the screen, you identify the screen, identify the field (in my case SALARY) but then in the script before retrieving the value you need to check first if the field exist or not, before doing anything. For example in this test program, depending on the input in the first screen, the second one will have or not the SALARY field. if you go to screen identification, in the case of NO salary, you don't have the field SALARY there.
I added here a Label extension, named it LABEL1 and this script for the OnScreenReady of the LABEL1 to set his value:
Code: Select all
if (FIELDS("SALARY") !== null)
var salary = FIELDS("SALARY").getValue()
else
var salary = 0;
FIELDS("LABEL1").setProperty("text", ("The Salary is " + salary));
FIELDS("LABEL1").refresh();-
eduardorama
- Posts: 13
- Joined: 19 Aug 2020, 11:26
Re: Set Cursor to Row
Hi Dino,
Normally, that's what I would do. But in this case, the output field does have a prompt and this prompt is the only way the output field gets filled.
Right now, i can't name the field because i can't get pass to the point where the prompt will appear.
Here's what it looks like: in green screen it looks like this: placing the cursor to the output field and pressing f4 will pop up this: Selecting value from prompt will then fill the output field
Normally, that's what I would do. But in this case, the output field does have a prompt and this prompt is the only way the output field gets filled.
Right now, i can't name the field because i can't get pass to the point where the prompt will appear.
Here's what it looks like: in green screen it looks like this: placing the cursor to the output field and pressing f4 will pop up this: Selecting value from prompt will then fill the output field
Re: Set Cursor to Row
The SET5250CURSORPOS(10, 20); seems to be working fine to set the cursor position in a row, column, if you first go to the screen, click extensions and enable the limitedcursorsupport.
there is a brief mention to that command here:
https://axesdocs.lansa.com.au/index.php ... 9ycG9zIl0=
there is a brief mention to that command here:
https://axesdocs.lansa.com.au/index.php ... 9ycG9zIl0=
-
eduardorama
- Posts: 13
- Joined: 19 Aug 2020, 11:26
Re: Set Cursor to Row
Thanks Dino, This is exactly what I was looking for.
It works now. The 'limitedCursorSupport' toggle is only for display of the cursor and the code works even without it.
It works now. The 'limitedCursorSupport' toggle is only for display of the cursor and the code works even without it.