Results 1 to 2 of 2

Thread: Correct Application of Data Mapping

  1. #1

    Correct Application of Data Mapping

    Good morning !

    Why does my keylookup returns false?

    I want to connect my company_code [vt_employee] to the company_code[vt_company] to get the company name.

    Here is my scenario:
    1. I am using virtual tables from a mysql engine and successfully created a db in Lianja. The MySQL db itself had indexes.
    2. Since the keylookup deals with indexes, I was thinking that perhaps my indexes were not incorporated to the virtual tables so I added the indexes in the console.

    ALTER TABLE vt_employee ADD FOREIGN KEY (company_code) TAG company_code;

    3. Added keylookup code :

    (Get Data Map)
    keylookup("vt_company", "company_code", "{}", name)

    (Set Data Map)
    keylookup("vt_company", "name", "{}", company_code)

    Did I misunderstand the process or did I miss something? It doesnt work on the grid and on the form. I hope you can help me out with this. Thank you very much

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    UK, USA, Thailand
    Blog Entries
    This usage of data mapping against virtual tables using KEYLOOKUP() is not supported.

    Index lookups in Lianja are only relevant to the embedded database engine.

    With external SQL databases you need to perform a SQL SELECT in the get/set data mapping. You can accomplish this using a Lianja function in a custom library.

    Be sure to create native indexes on the columns you want to lookup so that the query optimizer will use them for high speed row selections.
    Principal developer of Lianja, Recital and other products

    Follow me on:


Tags for this Thread



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