Home » Developer & Programmer » Forms » A button has to be disabled in Query mode(F11) (Oracle Apps 12i)
A button has to be disabled in Query mode(F11) [message #549770] Tue, 03 April 2012 11:21 Go to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
Hi Guyz,

Am developing a custom form. I have a block with 5 Items and one button(SUBMIT). When I go in query mode (F11), SUBMIT button to be disabled. How do i achieve this. Please share your views.

Thanks
Re: A button has to be disabled in Query mode(F11) [message #549773 is a reply to message #549770] Tue, 03 April 2012 14:07 Go to previous messageGo to next message
Littlefoot
Messages: 18824
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
KEY-ENTQRY trigger might look like this:
set_item_property(<disable the SUBMIT button>);
enter_query;

The question is: when do you want to enable it?
Re: A button has to be disabled in Query mode(F11) [message #549787 is a reply to message #549773] Tue, 03 April 2012 17:18 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
@littlefoot explained u in a good way

Try this
For prevention item from queried

you can use the
SET_ITEM_PROPERTY('itemname',
                                   query_allowed,
                                   property_false);
------------------------------------------------- 
if :SYSTEM.MODE = 'ENTER-QUERY' then
                   go_item('itemname');

  set_item_property('empno',
                     query_allowed,
                     property_false);

        end if;
           ENTER-QUERY;


and offcourse disabled button


regards
baba

[Updated on: Tue, 03 April 2012 17:19]

Report message to a moderator

Re: A button has to be disabled in Query mode(F11) [message #549788 is a reply to message #549787] Tue, 03 April 2012 17:26 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
SET_item_property('button_name',ENABLED,PROPERTY_FALSE/TRUE);

[Updated on: Tue, 03 April 2012 17:26]

Report message to a moderator

Re: A button has to be disabled in Query mode(F11) [message #549833 is a reply to message #549788] Wed, 04 April 2012 03:47 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
I have below code in KEY-EXEQRY however its not working as expected. Please advice.
It query's RECORD however SUMBIT button is not disabled.

execute_query;
go_item('blockname'.order_number');
set_item_property('blockname.SUBMIT', disabled , property_true);
Re: A button has to be disabled in Query mode(F11) [message #549834 is a reply to message #549833] Wed, 04 April 2012 03:59 Go to previous messageGo to next message
cookiemonster
Messages: 10573
Registered: September 2008
Location: Rainy Manchester
Senior Member
That would be because there is no such property as disabled. Form builder help lists all the properties you can set with set_item_property. Read it instead of guessing.
Re: A button has to be disabled in Query mode(F11) [message #549835 is a reply to message #549834] Wed, 04 April 2012 04:02 Go to previous messageGo to next message
maggy_ashee
Messages: 70
Registered: May 2007
Member
I tried ENABLED as well, didnt work. Any guess.

set_item_property('blockname.SUBMIT', enabled , property_false);
Re: A button has to be disabled in Query mode(F11) [message #549838 is a reply to message #549833] Wed, 04 April 2012 04:12 Go to previous messageGo to next message
Littlefoot
Messages: 18824
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
maggy_ashee wrote on Wed, 04 April 2012 10:47
I have below code in KEY-EXEQRY however its not working as expected.


Besides, I told you to use KEY-ENTQRY, not KEY-EXEQRY.
Re: A button has to be disabled in Query mode(F11) [message #549852 is a reply to message #549838] Wed, 04 April 2012 05:13 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
I think first issue has to be resolved that is button enabled or disabled i suggest u keep all button in control block. then ENT_QRY Or any other issue issues





reagrds baba

[Updated on: Wed, 04 April 2012 05:15]

Report message to a moderator

Re: A button has to be disabled in Query mode(F11) [message #549855 is a reply to message #549833] Wed, 04 April 2012 05:25 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
try this

  • Attachment: en_dis.fmb
    (Size: 40.00KB, Downloaded 52 times)
Re: A button has to be disabled in Query mode(F11) [message #549856 is a reply to message #549855] Wed, 04 April 2012 05:28 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
actual it is like this

GO_BLOCK('BLOCKNAME');
SET_ITEM_PROPERTY('ITEM_NAME' enabled... PROPERTY_false') ;
go_item('item_name')
Re: A button has to be disabled in Query mode(F11) [message #549857 is a reply to message #549856] Wed, 04 April 2012 05:33 Go to previous messageGo to next message
cookiemonster
Messages: 10573
Registered: September 2008
Location: Rainy Manchester
Senior Member
Will stop posting invalid code.
Re: A button has to be disabled in Query mode(F11) [message #549859 is a reply to message #549857] Wed, 04 April 2012 05:40 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
this worked on key-exeqry can u expalin mr@cookiemonster i wanted to also learn



reagrds
baba
  • Attachment: en_dis.fmb
    (Size: 40.00KB, Downloaded 48 times)
Re: A button has to be disabled in Query mode(F11) [message #549861 is a reply to message #549859] Wed, 04 April 2012 05:44 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
on trigger key-exeqry
execute_query;
go_block('control.submit');
set_item_property('control.SUBMIT', enabled , property_false);






regards
baba

[Updated on: Wed, 04 April 2012 05:44]

Report message to a moderator

Re: A button has to be disabled in Query mode(F11) [message #549862 is a reply to message #549859] Wed, 04 April 2012 05:45 Go to previous messageGo to next message
cookiemonster
Messages: 10573
Registered: September 2008
Location: Rainy Manchester
Senior Member
The go_block is invalid (why is itemname there?) and pointless, why do you need to change block?

There's no reason why the set_item_property shouldn't work. However it is in the wrong place for what the OP asked for.
They want the button disabled in enter-query mode.
If the OP has moved their code to the correct trigger, after Littlefoot pointed out the mistake, then that'll hopefully solve the problem.
Re: A button has to be disabled in Query mode(F11) [message #549864 is a reply to message #549861] Wed, 04 April 2012 05:48 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
on trigger key-exeqry no need to for "execute_query"
Re: A button has to be disabled in Query mode(F11) [message #549865 is a reply to message #549864] Wed, 04 April 2012 05:49 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
like this u wanted to say mr@cookiemonster actually my internet conn is dc time and again sorry for this posting pls explain if it is wrong



regards
baba

[Updated on: Wed, 04 April 2012 05:50]

Report message to a moderator

Re: A button has to be disabled in Query mode(F11) [message #549866 is a reply to message #549864] Wed, 04 April 2012 05:51 Go to previous messageGo to next message
cookiemonster
Messages: 10573
Registered: September 2008
Location: Rainy Manchester
Senior Member
Huh?
Try executing a query in a form that has a key-exeqry trigger with no execute_query in it and see what happens
Re: A button has to be disabled in Query mode(F11) [message #549867 is a reply to message #549864] Wed, 04 April 2012 05:51 Go to previous messageGo to next message
Littlefoot
Messages: 18824
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
owais_baba wrote on Wed, 04 April 2012 12:48
on trigger key-exeqry no need to for "execute_query"


On the contrary! If you wrote some code into KEY-EXEQRY, it overrides its default action, so - if you want it to execute query - you need to include EXECUTE_QUERY into the trigger code.
Re: A button has to be disabled in Query mode(F11) [message #549868 is a reply to message #549865] Wed, 04 April 2012 05:52 Go to previous messageGo to next message
cookiemonster
Messages: 10573
Registered: September 2008
Location: Rainy Manchester
Senior Member
owais_baba wrote on Wed, 04 April 2012 11:49
like this u wanted to say mr@cookiemonster actually my internet conn is dc time and again sorry for this posting pls explain if it is wrong

What on earth does that mean?
Re: A button has to be disabled in Query mode(F11) [message #549869 is a reply to message #549865] Wed, 04 April 2012 05:54 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
I think sir @maggy_Ashee question was this here he was talking about trigger key-exeqry that's why posted this code and fmb file as well



I have below code in KEY-EXEQRY however its not working as expected. Please advice.
It query's RECORD however SUMBIT button is not disabled.

execute_query;
go_item('blockname'.order_number');
set_item_property('blockname.SUBMIT', disabled , property_true);


[Updated on: Wed, 04 April 2012 05:55]

Report message to a moderator

Re: A button has to be disabled in Query mode(F11) [message #549870 is a reply to message #549869] Wed, 04 April 2012 05:58 Go to previous messageGo to next message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
still sir i am so curious if m wrong i wanted to correct my self from superiors like you



regards
baba
Re: A button has to be disabled in Query mode(F11) [message #549871 is a reply to message #549870] Wed, 04 April 2012 05:59 Go to previous message
cookiemonster
Messages: 10573
Registered: September 2008
Location: Rainy Manchester
Senior Member
owais_baba wrote on Wed, 04 April 2012 11:54
I think sir @maggy_Ashee question was this here he was talking about trigger key-exeqry that's why posted this code and fmb file as well

I think you need to read the whole thread:

maggy_ashee wrote on Tue, 03 April 2012 17:21

I have a block with 5 Items and one button(SUBMIT). [b]When I go in query mode (F11),[b] SUBMIT button to be disabled.


F11 is enter-query not execute-query.
Previous Topic: Cannot open file
Next Topic: insert and update
Goto Forum:
  


Current Time: Thu Apr 17 13:25:31 CDT 2014

Total time taken to generate the page: 0.05883 seconds