Solved

Forms6i: Post-Text-Item and Pre-Text-Item

Posted on 2002-06-11
6
10,809 Views
Last Modified: 2012-06-21
Hai,

I'm using forms 6i on Oracle9i database.
I have 2 blocks, block 1 -> CTL_1_BLK has 3 text items(txt1,txt2 and txt3). and 2nd block -> CTL_2_BLK has 2 buttons (APPLY and REVERT).

In BLOCK CTL_1_BLK i have two triggers POST-TEXT-ITEM and PRE-TEXT-ITEM written in BLOCK LEVEL.

In Pre-Text-Item i'm storing old value (before user enters new value) into a variable :parameter.pre_value and in Post-Text-Item i'm storing new value entered by user in :parameter.post_value. In POST-TEXT-ITEM i'm comparing old and new values(stored in 2 parameters) if the values are changed i will update the changed value ( here i will provide a confirmation window to user-- YES or NO ) If user clicks on YES from the confirmation window will update the database else if user clicks on NO i will revert back to old value which was stored in parameter during PRE-TEXT-ITEM trigger.

My question is, If I change the "txt_1" value and i click on apply i will be getting confirmation window( because post-text-item trigger will fire). If i click on Revert button (in 2nd block) again it will display the confirmation window.
Here some how i have to avoid to display this confiration window when user clicks on REVERT BUTTON, ie. some how i have to hide this confiramation window as soon as user clicks on REVERT BUTTON.

Can anyone give me the inputs..

BLOCK-1
   TRIGGERS --- POST-TEXT-ITEM ( stores new value and calls alert depending on check between :parameter.pre_value and :parameter.post_value)
            --- PRE-TEXT-ITEM (stores pre value)
   ITEMS    --- TXT-1
            --- TXT-2
            --- TXT-3
BLOCK-2
   ITEMS    --- APPLY
      TRIGGER --- WHEN BUTTON PRESSED
   ITEMS    --- REVERT
      TRIGGER --- WHEN BUTTON PRESSED
 
0
Comment
Question by:asuresh73
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 35

Accepted Solution

by:
Mark Geerlings earned 100 total points
ID: 7069901
I usually avoid pre-text_item and post-text-item triggers because they are fired more frequently than you expect, and at some times that you might not expect.

Is the block with the data items based on a table or view?
If it is, I would suggest creating some non-displayed items in the block, one for each displayed item to hold the "pre" value.  You can populate them all with a post-query trigger.  You don't need post-text-item triggers or a place to hold the "after" values since they are available directly in the items the user has access to.

You can then use a when-validate-item trigger to pop up a confirmation alert if the value has been changed.  Another option would be to use a when-validate-record trigger so that there would be only one confirmation alert regardless of how many items were changed.

If the block is not a base-table block, then the coding becomes more complex.  Oracle Forms may not be the best or easiest tool to use for non-base table forms.
0
 
LVL 5

Expert Comment

by:ser6398
ID: 7069921
If I understand your question, I think you want to set the Mouse Navigate property for the Revert button to NO.  Then, in a When-Button-Pressed trigger on the Revert button, set the value of the current item (use SYSTEM.CURSOR_ITEM to get current item) to :parameter.pre_value

Example:  COPY( :parameter.pre_value, :System.Cursor_Item);
0
 

Author Comment

by:asuresh73
ID: 7082900
Hello,

I was able to solve this problum. Thankz of co-operation.
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 35

Expert Comment

by:Mark Geerlings
ID: 7083791
If one of the responses helped you solve the problem, then please accept that as the answer to close the question.  Also, please leave a comment to describe how you solved it, since that may help others.
0
 

Expert Comment

by:lionofthejungle
ID: 7520455
Hi ASuresh,

What i inferred from your problem is that you want to apply the changes if the button is pressed and also the two values are different.
What i propose is that you call the alert on when button pressed trigger of the apply button rather than calling it on the poat text item
this way  when you press the apply button then only it will ask for a confirmation

I guess it will help

If i am not able to infer correctly from your problem then sorry about it

Please do write i will try my bst to help

thanks
0
 
LVL 5

Expert Comment

by:jpkemp
ID: 9170693
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Split between markgeer & ser6398
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
jpkemp
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to recover a database from a user managed backup

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question