Re: Help for a few question about form 4.5

From: DanHW <danhw_at_aol.com>
Date: 1998/02/21
Message-ID: <19980221044201.XAA26736_at_ladder02.news.aol.com>#1/1


><6cdlj2$e4s$1_at_bs33n.staffs.ac.uk>
>
>Sorry, i think these questions are very basic, but i can't figure out how to
>solve it:
>
>1. How to design button depend on event ?. I mean at one time 'save' button
>is active, but later on 'update' button is active. The word 'save' change to
>'update' depend on event.
>

In general , I use a when-new-item-instance trigger on the block to check the condition, and use set_item_property(<Item_name>, enabled, property_true/false) to set it enabled/disabled. I don't change the label on buttons dynamically, (kinda confusing to the users); I have 2 buttons that flip-flop being enabled. For the 'Save' button in particular, though I put the enable on the on-lock trigger so as soon as the user types a letter (and there is a real database lock on the table) the button is enabled. Likewise, I disable it in the post-database-commit trigger, when it has REALLY been saved, not when you think it has been saved.

>2. Is there any way to tell form 4.5 the direction of cursor?. I mean after
>the user press enter or tab key, the cursor will move to desired field
>(rather than move to field predifined by form 4.5)
>

There is value for the set_item_property to control/override that; probably 'NEXT_FIELD' or NEXT_ITEM. I don't know if its too late by the time you are in a validate trigger though. You might have to resort to setting a flag, and using the when-new-item-instance trigger to check the flag and going to one field rather than another.

>3. what is the command to check existing record? i am trying to comparing
>input data with existing record. if input data is same with existing record,
>the system will prompt the error message.
>

I believe the get_item_property (... DATABASE_VALUE...) will tell you what you want.

>4. Is there any good web site that i can refer to?
>
>
>Thank you very much.
>

Good luck
Dan Received on Sat Feb 21 1998 - 00:00:00 CET

Original text of this message