Home » Developer & Programmer » Forms » problem in clearing data from related data blocks in oracle forms
problem in clearing data from related data blocks in oracle forms [message #638909] Thu, 25 June 2015 04:43 Go to next message
PREETISINGLA
Messages: 3
Registered: June 2015
Junior Member
hello all,
I am quite new in oracle. i have three data blocks in my form blocka(non db),blockb(db block) and blockc(db),in first block I am populating a poplist using a field, similarly based on this list I have put a when list change trigger on one item of next block(block b),when I click on first poplist data appears and according to that another poplist also appears,
but my problem is when I clear the data by pressing the clear button all the data disappears ,but when I click on second poplist, the same data appears for the first poplist although I hv cleared the data, I want to clear all the blocks so that I can select new data.
my clear button code is:
Go_block('blockA');
clear_block(no_validate);

Go_block('blockB');
clear_block(no_validate);

Go_block('blockC');
clear_block(no_validate);

kindly provide me the way to resolve this problem...
Re: problem in clearing data from related data blocks in oracle forms [message #638914 is a reply to message #638909] Thu, 25 June 2015 06:07 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If I understood correctly what you said, the second poplist depends on the first poplist item and appears only when you select a value in the first poplist. If that's so, hide the second poplist in the "clear button" trigger code so that it won't even be visible to end user (so that he won't be able to click on it).

If that's not what you are looking for, run the form in debug mode and trace its execution so that you'll find a reason for such a behavior.
Re: problem in clearing data from related data blocks in oracle forms [message #638918 is a reply to message #638914] Thu, 25 June 2015 06:45 Go to previous messageGo to next message
PREETISINGLA
Messages: 3
Registered: June 2015
Junior Member
thanks for your reply.. but I want to clear the data that resides in the second poplist after pressing clear button.. i can't made second poplist unclicked when user clicks it, when I press clear button all the blocks gets cleared but only the second poplist does not get clear, it shows the data when according to previously selected item in the second poplist.

is there any other way to do it...it would be easy for me if u will provide some sample code to do it....
Re: problem in clearing data from related data blocks in oracle forms [message #639098 is a reply to message #638918] Wed, 01 July 2015 09:55 Go to previous message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
Poplist items get their values from a Record Group. You can dynamically control the record group using the CLEAR_LIST() built-in. It takes either the ITEM_ID or ITEM_NAME as an argument. Afterwards, you will have to use the POPULATE_LIST() built-in to add values back to the Poplist. You will first need to create a record group with the new values using the CREATE_GROUP_FROM_QUERY() built-in and then using the Record Group ID of the group you just created, use the POPULATE_LIST(RG_ID) built-in. For more information and a code sample look up the CREATE_GROUP_FROM_QUERY() built-in in the Forms Help.

Craig...
Previous Topic: how to run oracle form and reports 10g on internet and local area network at same time
Next Topic: bad bind variable parameter.G_query_find
Goto Forum:
  


Current Time: Wed Apr 24 06:23:39 CDT 2024