Results 1 to 10 of 10

Thread: How Do I Get Data From More Than One Table Into A Grid ?

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    5

    How Do I Get Data From More Than One Table Into A Grid ?

    Hi,

    I'm new to Lianja & am scripting in Python. If I take the Customers app described in the getting started guide as my base point. I would like to be able to modify this app so that I could display the order details in section 3 with the product name from the productsbyname table alongside the Product id.

    I can't quite figure out how to do this.


    All help much appreciated plus any pointers to additional documentation would be helpful


    David....

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,404
    We will be adding in the ability to define additional columns to a Grid later. Currently you need to have a field in the table to drag onto the Grid. It can then be assigned to a memory variable as the Data Source (and the field can then be dragged into the Grid a second/subsequent time if required). Using the KEYLOOKUP() function in the Get data mapping attribute displays the matching data (the example_datamapping App also illustrates this).

    Name:  add_column_to_grid.jpg
Views: 120
Size:  101.3 KB
    Name:  multiple_columns.jpg
Views: 117
Size:  109.6 KB

  3. #3
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Yvonne,

    I'm probably doing something wrong but its not working.
    I've set up a dummy field in the order_details table as you suggested.
    I drag this over to the grid, although this will only allow the field at the end of the grid which is another issue.
    I've set the data source as m.DUMMY2 (although I don't understand why as the field name is DUMMY) & the keylookup is as follows keylookup("products","productid",order_details.pro ductid,productname,"Not Found")

    I have the example_datamapping App but can't find any documentation as to how that app was built so it doesn't teach me anything.

    David.........

  4. #4
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Yvonne,

    I've quit Lianja & started it again & now the fields are showing ?! So my question is how do you change the positions of the fields within the grid - dragging doesn't seem to work

    David......

  5. #5
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,955
    Quote Originally Posted by davidlane View Post
    Yvonne,

    I've quit Lianja & started it again & now the fields are showing ?! So my question is how do you change the positions of the fields within the grid - dragging doesn't seem to work

    David......
    Hi David,

    on Windows RC5.5 dragging columns in a grid appears to be broken (worked in Linux). In RC5.6 released today it is fixed in Windows, and still works in Linux.

    Hank

  6. #6
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,404
    I've set the data source as m.DUMMY2 (although I don't understand why as the field name is DUMMY)
    The 'm.' signifies what follows is a memory variable and it can be any valid identifier. The one in my screenshot was m.dummy2 as I had added 3 additional columns to the grid using the dummy field and had named them accordingly.

  7. #7
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Hank,

    I'm using OS X 10.8.3 on a MacBook Pro - there appears to be some instability in the python code editor at the moment. quite often crashes when it hits something it doesn't like when saving - I can't give you much more detail at this stage as I've not been able to pinpoint it to anything in particular.

    I'll download 5.6 & see how that goes.

    David.....

  8. #8
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,778
    David, If you have some simple example that is reproducible please attach it to a ticket so I can run it in debug mode.
    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

  9. #9
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Hank,

    5.6 downloaded & installed. Unfortunately the problem is still there for OS X at least.

    David......

  10. #10
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,955
    Quote Originally Posted by davidlane View Post
    Hank,

    5.6 downloaded & installed. Unfortunately the problem is still there for OS X at least.

    David......
    Hi David,

    if you have a instance of Windows running in a VM on your Mac, I'd suggest installing 5.6 there: if it works for you there, then I'd suggest you submit a bug report for the Mac (since "user error" <s> will have been eliminated). You can test it right on the LianjaDemo opening page.

    Hank

Tags for this Thread

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