trigger to fire when navigating records

From: Aaron V <Tinkerist_at_hotmail.com>
Date: Sat, 03 Jan 2004 01:30:30 GMT
Message-ID: <WWoJb.719437$HS4.5228893_at_attbi_s01>



[Quoted] [Quoted] I did get around to trying this out and it works great, except for one thing. I can't seem to be able to find a trigger to fire when one is navigating between records in some places, like when you have, 20 records in [Quoted] a block and 10 are displayed, and the current record is the 12th record and [Quoted] it is the 5th record from the top. The Scrollbar Indicator will be floating [Quoted] somewhere in the middle of the scrolbar. If one where to click the up or [Quoted] down scrollbar buttons, the current record will change position, but it will [Quoted] still be the current record(won't fire the when-new-record trigger, or new-item-instance). So when this happens I have the formatting Item out of [Quoted] Physical sync with the original Item(it stayed in the same position, but the [Quoted] record moved up or down). I've tried this with every trigger I can think [Quoted] of, but none seem to fire in this scenario. forms 6i/Oracle 9i

Thank for any help,
--Aaron V

Thanks mcs for your reply,
this sounds like a great idea, especially because you could use this technique for almost any of the Set_Properties that can't be set for the instance. Thanks so much, and I'll give it a try.

--Aaron V

"mcstock" <mcstockspamplug_at_spamdamenquery.com> wrote in message [Quoted] [Quoted] news:1cSdna8Kt-PgKF2iRVn-sw_at_comcast.com...
> i assume you're using forms, and assume you're at using at least release
6i
> (don't forget to be specific in you next post)
>
> 'when-validate-item' is the typical trigger for detecting change at the
item
> level. see also when-validate-record and when-validate-form
>
> the SET_ITEM_INSTANCE_PROPERTY 'built-in' is the closest to what you want
to
> do as far as setting the attributes of one occurrence of a multi-row item,
> but it does not appear to support changing the format
>
> however, this can be simulated with a mirror ('synchronize with') item in
> the same block -- the implementation is not pretty but it can be made
> generic, and hence, reusable
>
> basic steps:
> 1) create a block item with its 'synchronize with item' property set to
the
> number item
> -- no format mask in this item
> -- important: set its 'number of items displayed' property to 1
> -- position the item exactly on top of the number item (same x, y, width)
> 2) create a WHEN-NEW-RECORD-INSTANCE trigger on the block that positions
the
> item (this code should be implemented in a reusable program unit, but see
> if you can get it working in the trigger first)
> -- set the y_pos based on:
> ---- the SYSTEM.TRIGGER_RECORD
> ---- block property TOP_RECORD
> ---- height of the item (can get dynamically with GET_ITEM_PROPERTY)
> ---- item property distance between records (must be hard-coded, cannot
get
> with GET_ITEM_PROPERTY)
> 3) set 'keyboard navigable' property of the number item to 'No'
> 4) create a WHEN-NEW-ITEM-INSTANCE trigger on the number item to set the
> focus to the edit item (using GO_ITEM)
>
> let me know if you need additional assistance, but if you know PL/SQL and
> can use on-line help this should give you enough to go by
>
> -- mcs
>
> "Aaron V" <Tinkerist_at_hotmail.com> wrote in message [Quoted]
> news:pPTvb.81853$Dw6.391391_at_attbi_s02...
> | Greetings,
> | Does anyone know a good way to exclude the commas when editing a number
> | field? I have a format mask that adds commas for readability on long
> | numbers, but when I edit the number, I don't want the commas to be
there.
> | For instance, if I where to put the decimal point off by one position
> | accidentaly on a long number, I would have to change the decimal
position
> | then remove all the commas or replace them where they should be. It
would
> be
> | easier to retype the number; yes, but I would prefer to have the option
to
> | edit it. The closest I could come up with was to Nullify the Format Mask
> on
> | a Pre-text-item trigger, then Replace it on a Post-text-item trigger.
> This
> | would work fine if I were viewing only one Record, but I am not. So all
> the
> | numbers for that whole column lose their formatting when the focus is on
> | that Item.
> | Also, is there a trigger that fires when an item is changed(at the same
> time
> | the Item_is_valid becomes False).
> |
> | Any help would be appreciated,
> | Aaron V.
> |
> |
>
>
Received on Sat Jan 03 2004 - 02:30:30 CET

Original text of this message