Home » Developer & Programmer » Forms » Post-Block Trigger - Trying to capture previous item (Oracle Forms 9.0.4.0.19)
Post-Block Trigger - Trying to capture previous item [message #471203] Thu, 12 August 2010 16:36 Go to next message
hanis
Messages: 5
Registered: August 2010
Junior Member
Hi. I have a form w/a tab canvas. BlkA is on Tab1 and Blk2 is on Tab2. In BlkA I have several items that have when-validate-item triggers. However, the trigger does not fire when I enter a value into item1 of BlkA followed by clicking on Tab2. To solve, I placed validate(form_scope) in the When-Tab-Page-Changed trigger. This works well with invoking the validation. However, focus remains on Tab2 (Blk2). I would like focus to return to failed validation item in Blk1. I can capture the block name using :system.cursor_block in the Post-Block trigger of BlkA, assign that value to a form parameter and when a validation fails via the When-Tab-Page-Changed trigger I can return user back to BlkA(Tab1). However, I need direction on how to return user to the specific item in BlkA that failed validation. Any tips would be helpful. Thanks.
Re: Post-Block Trigger - Trying to capture previous item [message #471238 is a reply to message #471203] Fri, 13 August 2010 00:34 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
With a GO_ITEM? Check whether :SYSTEM.TRIGGER_ITEM system variable helps in this case (might, as it returns BLOCK.ITEM).
Re: Post-Block Trigger - Trying to capture previous item [message #471337 is a reply to message #471238] Fri, 13 August 2010 08:17 Go to previous message
hanis
Messages: 5
Registered: August 2010
Junior Member
You're right, I do need to use the Go_Item, however, the problem is knowing which item caused the validation logic to fail once the user clicks on a new tab. The when-validate-item trigger does not fire at the item level when the user inputs a value (and does not tab or move to another item within the same blk) but rather immediately clicks on a different tab. Which is why I'm forcing validation logic with validate(form_scope) in the when-tab-paged-changed trigger (form level). I can return the user to the block that caused the validation to fail because I capture the block value in the post-block trigger. I would like to go a step further and capture the item that the user was last on before clicking onto a new tab. Reading help, the system.trigger_item and the system.cursor_item should not be used in the pre or post block triggers, or form level triggers as it will be NULL.
Previous Topic: html form personalization
Next Topic: Onetime where clause
Goto Forum:
  


Current Time: Fri Sep 20 03:32:30 CDT 2024