Automatic Data Entry

Peter De Berdt peter.de.berdt at pandora.be
Wed Oct 27 13:20:03 CDT 2004


On 27 Oct 2004, at 11:23, Chuck Pelto wrote:

> Morning Guys,
>
> On Oct 27, 2004, at 2:10 AM, Peter De Berdt wrote:
>
>> My guess would be Filemaker background (globals from Filemaker). I've 
>> seen a lot of Filemaker developers trying to do this when switching 
>> to another database system. It's not a good practice, that's for 
>> sure.
>
> In part correct, Peter. But not quite. A technique I use for key 
> fields consists of a alpa-char code AND a serial number in the key 
> field to help me keep track of which table is being linked to. So I'd 
> like to have an automatic alpha-char populated into a field and a 
> serial number automatically incremented to go along with it to make a 
> key that is unique to the record and the table.
>
> E.g. "Datafile" & "0000000123" to make Datafile0000000123 as the key 
> field for a record in a datafile in a database system.
>
> The other aspect is automatically populating a given field with a 
> given value. That value may be changed at a later date, e.g., all 
> ItemQuantity values for records in a given data file are populated 
> with 1, when a new record is created in a sales-related datafile. This 
> can be changed by the user at a latter date, but since 1 is the most 
> common occurrence, then that reduces their work for entry.
>
This is something you have to code in REALbasic (or whatever 
environment you're programming in), not from Valentina (you could use a 
calculation/method field, but this can't be changed). If your 
application is object-oriented, this should be very easy (because your 
object will automatically generate the field). Once you get the grasp 
of object-oriented programming and your framework classes are well 
written, you'll soon discover all the repeating and tedious work you 
need to do in Filemaker simply isn't necessary. If you try to 
maintaining the same workflow of Filemaker, i.e. throwing in another 
field whenever you like, coding in the controls themselves instead of 
thinking out a decent structure, your application will soon become 
unmaintainable.

Filemaker is like Lego, you just puzzle together some pieces, and you 
can make very beautiful (and productive) solutions with it, but it 
isn't smooth (the lego blocks have edges). There will be many times 
where you have to use tricks to get what you want (every filemaker 
developer knows of the hundreds of workarounds and need for plug-ins). 
When something isn't well implemented, you just break out a piece of 
the puzzle, then put some new lego blocks back in, if there's some junk 
or holes in the middle and no one notices, you can get away with it.
Object-oriented development is just like real sculpting, everything 
needs to be well thought out before you start chopping of pieces. If 
you start chopping away, you'll soon make some irrepairable damage and 
have to start over. But the end result will be so much smoother and 
realistic.

Best regards

Peter De Berdt



More information about the Valentina mailing list