Results 1 to 3 of 3

Thread: aray element as alias

  1. #1
    Senior Member
    Join Date
    Oct 2012
    Posts
    234

    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

    ????

  2. #2
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,129
    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

  3. #3
    Senior Member
    Join Date
    Oct 2012
    Posts
    234
    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

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us