Results 1 to 5 of 5

Thread: How to print() a memo field?

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

    How to print() a memo field?

    Hi all,

    I'm using getCursor and getData to access a cursor in a Javascript app.

    It works fine with a string field:

    var lo = Lianja.getCursor("drequest");
    print(lo);
    print(lo.getData("caction"));

    But when I use it with a memo field, I get "false" printed:

    var lo = Lianja.getCursor("drequest");
    print(lo);
    print(lo.getData("mjson"));

    i tried adding on the .trim() method (figuring that's often needed in VFP/Lianja), but no joy.

    The object here is to output a memofield to a JavaScript-based webview, using the current record of the drequest cursor.

    TIA,

    Hank

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,376
    Hi Hank,

    Where are you testing it? I can do a getData() of employees.notes in the actual browser, but it's returning undefined in the Web App View.

    Regards,

    Yvonne

  3. #3
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,941
    Hi Yvonne,

    I tested from the JS command window, had it in a webview, test web view and actual browser (deploy/preview).

    In the command window, I can getData for "firstname" but not "notes".

    In the 3 other places, I get an error that "getCursor" is undefined. I'll submit a ticket.

    thanks,

    Hank

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,769
    Hi Hank

    As I responded in the ticket, javascript is a case sensitive language so GetCursor is not the same as getCursor().
    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 Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,769
    Hi Hank

    Memo fields have an unlimited length so these are not stored as standard members of a cursor. They can be huge and are therefore stored only in the UI element to conserve memory usage in the browser and particularly on a mobile device.
    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

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