Results 1 to 4 of 4

Thread: What does DEFAULT mean in the context of a field definition?

  1. #1

    What does DEFAULT mean in the context of a field definition?

    One of the things I liked when I started digging into Lianja was the ability to assign a default value to a field. I assumed this would mean that on adding a new record, its values would be pre-populated with default values where they existed.

    As I have thousands of instances where I waste time assigning things like the current datetime and username to newly added records, I imagined I was about to streamline development by being able to have such data automatically inserted into new records without me having to code it.

    Not so?

    With the datetime field I added, I made the default value DATETIME(), assuming that this would call the standard VFP function of that name. That failed, so what should I have written? Or am I completely misinterpreting the Lianja notion of Default?

  2. #2
    Hi Harry,

    This is working for me. If you are setting the default value in the column attributes of a form, make sure that "Inherit dictionary rules" is False. If you continue to have difficulty, please submit a ticket and attach your app and data. Thanks!

  3. #3
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,161
    Blog Entries
    22
    As Dave points out you can have a "Default" value in the table/column attributes or a "Default" value in the grid/column attributes.
    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
    This is specifically an issue with setting the default in the table column attribute - setting it in the form/grid works fine. A ticket has been opened.

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