Hiding/showing Certain fields when a Radio button is selected [message #160471] |
Sun, 26 February 2006 16:36 |
Achilles
Messages: 15 Registered: February 2006
|
Junior Member |
|
|
Hello all
I'm new to Oracle, and I desparately need some help. I'm developing an application, which has three Radio buttons
Rd1 , Rd2, Rd3
Now when Rd1 is selected I want a few fields to appear on the same form below The Radio group, while fields relevant to Rd2 and Rd3 should remain hidden.
Similarly when Rd2 is selected fields relevant to Rd1 and Rd3 are hidden while only those relevant to Rd2 appear.
can anyone please suggest, how to implement?
Thanks alot in advance.
Achilles.
|
|
|
|
Re: Hiding/showing Certain fields when a Radio button is selected [message #160595 is a reply to message #160471] |
Mon, 27 February 2006 08:43 |
Achilles
Messages: 15 Registered: February 2006
|
Junior Member |
|
|
Thanks alot. That is exactly what I needed.
One more question. When u call a form from your main menu (switch board). HOw do you determine the Mode in the called form?
For example:
in the calling form I define a the Procedure 'WHEN_BUTTON_PRESSED' for a pushbutton as
call_form('form1.fmx', HIDE, no_replace, no_query_only);
And for another pushbutton I define the same procedure as:
call_form('Form.fmx', HIDE, no_replace, query_only);
I know it can be done by passing parameters if I'm already working in some data entry form, by sending the ":system.record_status". and then check the parameter value in the called form. But what I'm stuck at what to do here. In Form1.fmx I a few checks in the 'WHEN_NEW_FORM_INSTANCE' Trigger. like:
go_block('LETTER_block');
if :system.record_status='QUERY' Then
execute_query;
enable_disable_items('letter_block', property_off);
elsif :system.record_status='INSERT' THEN
enable_disable_items('letter_block', property_on);
create_record;
But the execute_query; statement never works and the records are not fetched into the form. If I move the execute_query outside the 'IF' Statement and place it above the if, and then execute the form. The form compiles and then disappeares!. I dont know what to do here.
I have three buttons on the switch board.
1. "Add REcord"
2. "Search Database'
3. View All Records
By clicking "Add record" I want to call Form1.fmx and it should be in the "create_record" mode.
By clicking "Search Databse" I wan to call the same Form1.fmx and it should be in "Enter Query" mode.
By clicking 'View All Records" I want it to fetch records from the databse into the form.
Any help?
Thanks.
[Updated on: Mon, 27 February 2006 13:48] Report message to a moderator
|
|
|
|
Re: Hiding/showing Certain fields when a Radio button is selected [message #161055 is a reply to message #160868] |
Wed, 01 March 2006 15:23 |
Achilles
Messages: 15 Registered: February 2006
|
Junior Member |
|
|
Once again thanks for your reply.
Actually what I'm doing is from the Switchboard, the "View All Records" button results in a call to form1.fmx in this fashion:
call_form('Form1.fmx', HIDE, no_replace, query_only);
Now in "Form1.fmx", I check the current form status, since it should be open in "query only" mode, here's what I do:
if :system.record_status='QUERY' Then
go_block('block_name');
item_enable_disable('block_name', property_off);
execute_query;
Is there anything wrong with what I'm doing? Why arent the records fetched? THe form opens in "Query only" mode but only the records are not fetched.
I'm using Oracle 10G with Forms 6i.
Thanks.
|
|
|
Re: Hiding/showing Certain fields when a Radio button is selected [message #161517 is a reply to message #161055] |
Sun, 05 March 2006 22:45 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
I have just gone through the reference manual and there does not appear to be an item that can be tested to see whether a form has been opened in 'query_only' mode. I repeat, either pass a parameter or use a global and test it in the new form.
Quote: | I check the current form status, since it should be open in "query only" mode
| You CAN NOT determine the status of a Form by testing the status of a Record.
David
|
|
|