Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 28

Thread: Syntax for referencing another column in the table

  1. #11
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,778
    Hi David,

    Metadata can be attached to a database, table or column.

    The metadata key/value pairs for column metadata are prefixed with formitem. if you want this applied to the UI. You can have your own key/value pairs e.g. am.audit=true or whatever.
    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

  2. #12
    Senior Member
    Join Date
    Apr 2012
    Location
    Dubai, United Arab Emirates
    Posts
    485
    Hi Barry,

    The problem I'm getting is how do I use alter table to get the formitem in there.

    For example I want to set the caption for a column so that on the section it displace species rather cspecies

    omd = object()
    omd.formitem = object()
    omd.formitem.caption = "Species"

    that gives me in the metadata

    [formitem]caption

    which does not work. formitem.caption does

    How does one get the actual wording formitem.caption in there

  3. #13
    Senior Member
    Join Date
    Apr 2012
    Location
    Dubai, United Arab Emirates
    Posts
    485
    Thank you the enabled is working now in runtime.

  4. #14
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,778
    Quote Originally Posted by avianmanagement View Post
    Hi Barry,

    The problem I'm getting is how do I use alter table to get the formitem in there.

    For example I want to set the caption for a column so that on the section it displace species rather cspecies

    omd = object()
    omd.formitem = object()
    omd.formitem.caption = "Species"

    that gives me in the metadata

    [formitem]caption

    which does not work. formitem.caption does

    How does one get the actual wording formitem.caption in there
    Objects are dynamic arrays that can be accessed using the syntax object_name[ "member_name" ] if the member names contain non identifier characters such as a '.'

    Like this.

    Name:  Screen Shot 2018-11-04 at 11.53.55 AM.jpg
Views: 13
Size:  31.8 KB
    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. #15
    Senior Member
    Join Date
    Apr 2012
    Location
    Dubai, United Arab Emirates
    Posts
    485
    Thanks Barry that works perfectly

  6. #16
    Senior Member
    Join Date
    Apr 2012
    Location
    Dubai, United Arab Emirates
    Posts
    485
    Well nearly,

    omd["formitem.tooltip"] = "Ring"

    that does not seem to work, ran the page as well as looked at it in development mode. No tool tip comes up when mouse hovered over filed on section

    If I put in "test" by hand into the field in the section then it work

    I have also tried omd.tooltip = "Ring"

    both entries get put into the metadata, I can see them in the metadata editor for the column

  7. #17
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,778
    Quote Originally Posted by avianmanagement View Post
    Well nearly,

    omd["formitem.tooltip"] = "Ring"

    that does not seem to work, ran the page as well as looked at it in development mode. No tool tip comes up when mouse hovered over filed on section

    If I put in "test" by hand into the field in the section then it work

    I have also tried omd.tooltip = "Ring"

    both entries get put into the metadata, I can see them in the metadata editor for the column
    When used with a formitem It is called "edittooltip".

    I have corrected this. The name can be "edittooltip" or "tooltiptext" as is documented.

    https://www.lianja.com/doc/index.php/FormItem

    and

    https://www.lianja.com/doc/index.php/Category:Common_Properties

    Also worth mentioning is that tooltips can contain basic html formatting too not just plain text.
    Last edited by barrymavin; 2018-11-04 at 00:32.
    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

  8. #18
    Senior Member
    Join Date
    Apr 2012
    Location
    Dubai, United Arab Emirates
    Posts
    485
    Thanks Barry,

    What might be very useful to developers is that when on the section and looking at field attribute the description we get, as per the image below, also gave teh name to use in the metadata. So in the image below if it said

    A tooltip to display when mouse hovers over the data
    Meta data name tooltiptext


    Name:  tooltip.png
Views: 13
Size:  12.6 KB

  9. #19
    Senior Member
    Join Date
    Apr 2012
    Location
    Dubai, United Arab Emirates
    Posts
    485
    Hi Barry,

    The docs at this time are missing a number of formitem properties.

    Are there any commands I can use to get the names of them from Linaja itself, such as the formitem name for User Selectable Search Field.

    The meta data stuff is brilliant and is very much like what I'm used to using with my current framework, I just need to get my head around the syntax and then I can write some code to automate writing a prg from my Xcase model

  10. #20
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,778
    The UI (App Inspector) displays more meaningful names. They do not correspond to the internal attribute names. The formitem doc will be expanded. Most developers are not interested in that level of detail. Most are there with a few exceptions.
    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

Page 2 of 3 FirstFirst 123 LastLast

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