In brief I'm trying to pass the user selection in program 1 to program 2 to populate a screen field.
The selection I want to pass is when the user touches a row on a table to pass the value of that row, I assume my code would need to look something like this:
OnRowClicked.Operation
(
Type : PerformAction
Pgm : PROG2
Action : CALLED_FROM_PROG1
Param%1 : ValuefromTable
) +
I can't figure out how to put the value from the table into the parameter though. A couple of methods I've tried (for reference the value is column 2, called stock, linked to field stockcode on a local table.)
Param%1 : col%2
Param%1 : STOCK
Param%1 : ( FLD:STOCKCODE )
In the first two cases it has taken my input to be a character constant, in the third it returned a blank. I assume there is some combination of syntax I'm missing here so hopefully someone can point out
The second problem I've got is populating the field in program 2, I think the problem is that I've linked the field to a global variable:
LRNG_SetProperty( '/Form.Fields.S1BARC.Value.&.GVAR': 'LASTSTOCKCODE' );
So when I try to set property on it this doesn't take, I've tested by transferring to a different field on screen:
LRNG_GetProperty( 'CurrentOp.Param%1' : S1STCK : %size(S1STCK) );
This then shows the value (although due to above problem not the right value.)
I'm wondering if what I need to do is to invoke a javascript call in program1 to populate the global variable and so it'll be available in program2?