Results 1 to 8 of 8

Thread: Data validation

  1. #1
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893

    Data validation

    Hi,
    I'm try this code:
    (iif(keylookup("categories", "CATEGORYID", {}, "found", "notfound"))="found", true, false)

    into the Validation attribute of CATEGORYID column of Products table.

    but don't work.. return always "false"

    How can I test the typed value?

    thanks
    Fabio

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    JavaScript = is an assignment operator. Use ==
    Last edited by barrymavin; 2018-06-18 at 07:58.
    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 Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    Quote Originally Posted by barrymavin View Post
    JavaScript = is an assignment operator. Use ==
    keylookup("categories", "CATEGORYID", {}, true, false)
    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

  4. #4
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    Hi Barry,
    don't work..
    I'm tryng directly on the column validation.. I open the Product table with "double click" and edit the record on browse window.
    Name:  2018-06-18 15_05_01-Window.jpg
Views: 262
Size:  66.8 KB

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    That’s because you are jumping around changing what you are doing. Browse is just for looking at the data. Go try it in your original tests with a formitem.

    if you ask a question or make a statement about something not working because always return “false” which I explained. Why do you then ignore the reply and try something else which is unrelated.

    Follow the reply to your original post.
    Last edited by barrymavin; 2018-06-18 at 08:27.
    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

  6. #6
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    Hi Barry, I'm following the suggestion to use the data validation on the table..
    I'm tryng to create a double data validation:
    the first on the formitem, the second, on the table.

    I want to prevent a wrong data input also if comeone try to update the record throug ODBC.

  7. #7
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    Phabio,

    You asked this question last week and I answered you.

    What do you think {} is to the database engine? This is a UI specific notation to substitute the current text in a formitem.

    That validation is handled internally by the database engine.

    Try it it in a form section. Not in browse.

    If if you want it in the database engine you need to specify the column name not {} although I suppose the engine could recognize {} to simplify it for you.

    Submit an ER.
    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. #8
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    Hi Barry,
    no no... the field name it's ok.

    On the doc I've not found any sample..
    I've this with "this" and "this.value".. :-)
    but not with che column name.. :-)

    Code:
    (keylookup("categories", "CATEGORYID", products.categoryid, true, false))
    Work fine!

    sorry for the mistakes.

    the next week I'm back to Bologna.. my Lasagna is waiting for you.

    Fabio

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