Results 1 to 7 of 7

Thread: KEYLOOKUP() in LCS

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

    KEYLOOKUP() in LCS

    I didn't really expect keylookup() to work in LCS, and in fact it does not. Given that it's part of Lianja VFP, that was expected.

    There is mention in the roadmap of using JavaScript functions to access local cursors.

    Is there an example of doing so in the existing samples? Or is something else planned?

    thanks,

    Hank

    PS: I put a Lianja.evaluate([...]) around the keylookup, figuring this would force evaluation on the server. It works on the desktop, but still no joy on LCS.

    PPS: I'm guess that accessing the data through the JS dataengine would be the way to go. Tried using the database and recordset classes per the wiki, but I must be missing something.
    Last edited by HankFay; 2014-02-04 at 14:57.

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,196
    Blog Entries
    22
    Hi Hank,

    What is it you are trying to achieve?

    calculated fields and OData extensions for data mapping are in the roadmap as are delegates and custom JavaScript libraries.
    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,187
    I was trying to use a GET expression for a user-friendly display of an FK field. I had read the roadmap, didn't see any reference that seemed to fit.

    thanks,

    Hank

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,196
    Blog Entries
    22
    Hi Hank,

    thats the OData extensions for data mapping. This will be handled automatically by the web client when it reads and updates data as is currently the case with the desktop client.
    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

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

    fantastic. I was thinking of rolling my own in JavaScript, using the Database and Recordset classes, figuring I'd open the data in the client in JS, create an index on the recordset using SQL, and then write a function to do a seek on the recordset. The question being: will doing so in the page itself open the data on the client?

    thanks,

    Hank

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,196
    Blog Entries
    22
    Hi Hank,

    I'd recommend waiting for the LianjaWebFramework classes before doing anything like that.

    You don't need to process data like that on the client. You can call any server side procedures. Also OData has all that built in and this is easier to use and consume the JSON result in your client App.

    Whenever you want to perform any custom CRUD operations I'd recommend OData calls. This Web Client API (using the Lianja System Object) will be documented along with an explanation of how to use the LianjaWebFramework classes when they are completed as per the roadmap.

    When the custom LianjaWebFramework classes are available the Database and Recordset classes will use async OData calls internally.

    The Web Client JavaScript API has a way of posting multiple async calls to the server and chaining them together as each one completes. This in fact is how {...} macro substitution is performed and is particularly useful when macros are nested e.g {myfunc('{{customers.customerid}}')}

    Notice that in this example {{customers.customerid}} is substituted on the client which maintains local cursor state, in this case referencing the customerid field in the customers local cursor. Following that the myfunc() procedure in the app directory is called and the result it returns is substituted in place of the macro.

    I will put some examples together as we progress.
    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

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

    thanks for the clarification.

    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