-
aray element as alias
I want to use the array element as an alias reference in Lianja / VFP commands
In VFP the form &aRy[1,1] can be used, in Lianja the (aRy[1,1]) .
but as long as it is possible to use &aRy[1,1] -> FIELD or &aRy[1,1]..FIELD in VFP, I can't find a working solution in Lianja
(aRy[1,1]).FIELD
(aRy[1,1]) -> FIELD
(aRy[1,1] -> FIELD)
&(aRy[1,1]).FIELD
&(aRy[1,1])->FIELD
????
-
Hi Strato,
I don't know what exactly you are trying to achieve, but maybe this can help.
I found 2 tables in southwind database with the same field name (ORDERID): ORDERS and ORDER_DETAILS
Assuming I want to show ORDERID of 20th record in both tables:
Code:
close database
open database southwind
declare aa[2]
aa[1]='orders'
aa[2]='order_details'
for ii=1 to 2
use &(aa[ii])
browse
goto 20
jj=aa[ii]+".orderid"
? &jj
endfor
Results:
10267
10254
-
hi Josip,
thanks for Your answer
yes, that's exactly what I want, but since the code is already written in VFP, I was hoping that there was code that would work in Lianja as well, without having to introduce additional auxiliary variables