In an attempt to get around this issue I have removed any validation for
empty fields from the field level validation and only left them in the
record level validation. I ran into a problem then, in that the record level
validation did not seem to be invoked at all (I could add records with empty
fields), so I decided to follow some earlier advice and make the field 'not
null' in my SQLite database and leave the validation to the database. Now
when I run the form I get a cryptic message (Dabo Error Log: Sat Jan 24
15:40:08 2009: Error fetching records: ) saying that a problem occured when
loading the dataset.
I can go back to square one and start again - but just wondered if anyone
has some clues as to where I might be going wrong.
Thanks
Rodgy
----- Original Message -----
From: "Ed Leafe" <[email protected]>
To: "Dabo Users list" <[email protected]>
Sent: Saturday, January 24, 2009 12:05 PM
Subject: Re: [dabo-users] Drop Down List as a Lookup
> On Jan 23, 2009, at 6:46 PM, Roger Lovelock wrote:
>
>> 1/ I have a simple CRUD screen with validation in the business
>> object. The first two of the fields are validated that they are not
>> empty. When I execute a new() the fields start to clear, but then
>> everything stops wiith my error message on the second field saying
>> something must be entered. Its as if the validation is being
>> performed as the new (blank) record is being added - does this imply
>> that all fields must have a default value that meets the validation
>> criteria?
>
> Is this field-level validation? If so, then you probably should
> provide appropriate default values. Record-level validation is only
> applied when attempting to save a record to the database.
>
>> 2/ Second problem - I may not be having joy here as the situation is
>> obscured by the first problem - I want a drop down list of account
>> codes to use as a lookup mechanism ie list all account codes on the
>> screen - click on one and navigate directly to that record. I have
>> created the dropdown list OK - obviously I cannot link the dropdown
>> list to the datasource and datafield as when I am adding a record
>> the new account code will not exist - I am assuming I will have to
>> write some code to change the current record when a value is
>> selected from the dropdown list - are there any simple examples
>> around?
>
>
> http://dabodev.com/wiki/HowToPopulateAndUseListControls
>
> -- Ed Leafe
>
>
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/de163b66902b4b33a8335c8422a88...@roger