Results 1 to 3 of 3

Thread: Enumerated Types in Lookups in 4.1

  1. #1
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,071

    Enumerated Types in Lookups in 4.1

    Hi Barry,

    with data mapping available in 4.1 LCS, there's a Use Case I would like to be able to handle, so I thought I'd ask how this would be done.

    The Use Case is that our lookups for fixed choices (enumerated types) consists of, for example, the values (A,B,C,D,M) and corresponding descriptions (Apple,Banana,Cherry,Durian,Mango).

    How do you see that working out in terms of data mapping in Javascript apps? I realize you're probably not there yet, but thought I'd ask just in case. Obviously I could make a call to a VFP procedure to the server, but I'm also anticipating offline working coming in 5.0, so would like to avoid that.

    It would be ideal if however it worked I could stick a JSON string on a control attribute, because then I could attach it to the field in metadata and the workflow becomes seamless.

    thanks,

    Hank
    Last edited by HankFay; 2017-11-01 at 16:55.

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,246
    Hi Hank

    Data mapping in web and mobile clients is a challenge to do it properly which is why it’s been left until 4.1 or possibly 4.2.

    In terms of usage I see two types of map.

    1. Static values that do not change
    2. Dynamic values that can change

    Type 1 just requires a simple lookup in a local key/value map which can be optionally included in the App itself.

    Type 2 requires a trip to the server

    I will be extending the column attributes to denote that a column should be mapped and unmapped at runtime. This will be accomplished using data mapping delegates (table events). There will be data mapping delegates which generate a table of key/value pairs for controlsources e.g map.employees.id and unmap.employees.id. The static delegate will be called when the app is generated and stored in the app as a Javascript object or in local storage that can be used to map/unmap controlsources at runtime.

    I may do the same for dynamic values so that they can be looked up locally without a round trip. if the target foreign table has had records added the local map will be refreshed at intervals.

    Thats basically my thinking.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,071
    Hi Barry,

    Yippee ki yay! It doesn't get any better than that!

    thanks,

    Hank

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