Home » Developer & Programmer » Forms » WHEN_CHECKBOX_CHECKED
WHEN_CHECKBOX_CHECKED [message #276698] Fri, 26 October 2007 00:49 Go to next message
Vizith
Messages: 32
Registered: October 2007
Location: bangalore
Member
hii guyzz n girlzzzz this is vizith am new to orafaq..

i am havinfg develoepr 6i version i want to display an lov based on chekc box feild selection by using WHEN_CHECKBOX_CHECKED this trigger can any one help me out.

regds
vizith
Re: WHEN_CHECKBOX_CHECKED [message #276716 is a reply to message #276698] Fri, 26 October 2007 01:42 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
List of values is "attached" to an item. Typically, it is done by a push button, not the checkbox, but never mind. You'd have to go to that item and open list of values:
GO_ITEM('block_name.item_name');
LIST_VALUES;
Re: WHEN_CHECKBOX_CHECKED [message #276719 is a reply to message #276698] Fri, 26 October 2007 01:48 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
If I have read it correctly, you want to enable the lov, only the check box is checked.
As you have mentioned that you are using WHEN_CHECKBOX_CHECKED trigger, what is the code you have written to enable the lov?

If I have misread your post, the answer is in the previous post.

Edit: By the way have a look at OraFAQ Forum Guide.
By
Vamsi

[Updated on: Fri, 26 October 2007 01:50]

Report message to a moderator

Re: WHEN_CHECKBOX_CHECKED [message #276720 is a reply to message #276716] Fri, 26 October 2007 01:52 Go to previous messageGo to next message
Vizith
Messages: 32
Registered: October 2007
Location: bangalore
Member
Hii littlefoot,

thank u very much for ur reply,but let me explain my exact problem to you,
i hav two lov's 1)to_ord_no
2)to_ord_no_past15days

and i hav a check box mtdn if i check mtdn then it should display 1st lov and if its unchecked then i hav to use 2nd lov
guess you understood my explonation

regds
vizith
Re: WHEN_CHECKBOX_CHECKED [message #276722 is a reply to message #276719] Fri, 26 October 2007 01:56 Go to previous messageGo to next message
Vizith
Messages: 32
Registered: October 2007
Location: bangalore
Member
hi vamsi,

guess my last post will give u clear picture about issue.main thing is i am unable to find WHEN_CHECKBOX_CHECKED trigger so i written in WHEN_CHECKBOX_CHANGED


IF :TNQ_OPM_MIT_HDR.MDTN = 'M' AND :TNQ_OPM_MIT_HDR.DOC_TYPE='OTN' AND :TNQ_OPM_MIT_HDR.PREP_TYPE='M' THEN
set_item_property(':GMI_XFER_MST_V.ATTRIBUTE26',LOV_NAME,'TO_ORD_NO_MTDN_CHECKED');
ELSE
(':GMI_XFER_MST_V.ATTRIBUTE26',LOV_NAME,'TO_ORD_NO');

END IF;


will it work in the same way ..

regds
vizith







_____________________________________________________reply__

If I have read it correctly, you want to enable the lov, only the check box is checked.
As you have mentioned that you are using WHEN_CHECKBOX_CHECKED trigger, what is the code you have written to enable the lov?

If I have misread your post, the answer is in the previous post.

Edit: By the way have a look at OraFAQ Forum Guide.
By
Vamsi
[Updated on: Fri, 26 October 2007 01:50]
Re: WHEN_CHECKBOX_CHECKED [message #276724 is a reply to message #276722] Fri, 26 October 2007 02:07 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
You haven't read the Forum Guide yet.
Posting with tags increases the readability, which yields a reply.

By the way what is TNQ_OPM_MIT_HDR?

Anyway In WHEN_CHECKBOX_CHANGED trigger, you need to write the code as following.
If the checkbox is checked 
          (you can check this by comparing the value,
           which you have given for the check box, when is it checked)
  set_item_property(use first lov, as you have mentiioned)
else
  set_item_property(use the second)
end if;
By
Vamsi

[Updated on: Fri, 26 October 2007 02:07]

Report message to a moderator

Re: WHEN_CHECKBOX_CHECKED [message #276726 is a reply to message #276722] Fri, 26 October 2007 02:12 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
That should be OK - the point is in setting item 'LOV_NAME' property, which you have done.

However, item is NOT referenced with a colon (:) - change it to
set_item_property('GMI_XFER_MST_V.ATTRIBUTE26',   --> see? No ':' here!
                   LOV_NAME,
                  'TO_ORD_NO_MTDN_CHECKED'
                 );

I don't know what all IF conditions do, but the WHEN-CHECKBOX-CHANGED should look like this:
if checkbox_checked('cb_lov')
then
   set_item_property('block.item', lov_name, 'lov_1');
else
   set_item_property('block.item', lov_name, 'lov_2');
end if;
Re: WHEN_CHECKBOX_CHECKED [message #276926 is a reply to message #276726] Sat, 27 October 2007 00:47 Go to previous messageGo to next message
Vizith
Messages: 32
Registered: October 2007
Location: bangalore
Member
Thnak you very much guyzzz .. thanks for ur replies .
but i had only one doubt guyz


IF CHECKBOX_CHECKED('MDTN') THEN
set_item_property(':GMI_XFER_MST_V.ATTRIBUTE26',LOV_NAME,'TO_ORD_NO_MTDN_CHECKED');
ELSIF :TNQ_OPM_MIT_HDR.MDTN = 'M' AND :TNQ_OPM_MIT_HDR.DOC_TYPE='OTN' THEN
set_item_property(':GMI_XFER_MST_V.ATTRIBUTE26',LOV_NAME,'TO_ORD_NO');
END IF;


in the above code IF CHECKBOX_CHECKED('MDTN') will this type of check condition works ..?
Re: WHEN_CHECKBOX_CHECKED [message #276930 is a reply to message #276926] Sat, 27 October 2007 01:22 Go to previous messageGo to next message
Vizith
Messages: 32
Registered: October 2007
Location: bangalore
Member
i mean checkbox_checked('xyz') syntax is correct or not ..?
kindly check this and reply pls .. thanks in advance

regds
vizith kumar
Re: WHEN_CHECKBOX_CHECKED [message #276933 is a reply to message #276930] Sat, 27 October 2007 03:03 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Yes. The syntax is correct.
You should post the error, without which no one can help you out.

By the way, you haven't removed the ':' s, as LittleFoot has mentioned.

By
Vamsi
Re: WHEN_CHECKBOX_CHECKED [message #276939 is a reply to message #276933] Sat, 27 October 2007 03:38 Go to previous messageGo to next message
Vizith
Messages: 32
Registered: October 2007
Location: bangalore
Member
dear vamsi,

infact it's not displayin any error vamsi. but still that condition was not working .. i mean i was unable to display lov.
and little foot asked me to add ':' to that statement vamsi.

regds
vizith
Re: WHEN_CHECKBOX_CHECKED [message #276940 is a reply to message #276939] Sat, 27 October 2007 03:46 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Yes, Of course! It won't show.
Quote:

set_item_property(':GMI_XFER_MST_V.ATTRIBUTE26',LOV_NAME,'TO_ORD_NO_MTDN_CHECKED');
Have you looked at the syntax of set_item_property?
You need to pass the field name. Why did you put a ':' there?

Have you tried after removing that? You should read the suggestions first and then report the problem.
Quote:

However, item is NOT referenced with a colon ( : ) - change it to

set_item_property('GMI_XFER_MST_V.ATTRIBUTE26', --> see? No ':' here!
LOV_NAME,
'TO_ORD_NO_MTDN_CHECKED'
);


By
Vamsi
Re: WHEN_CHECKBOX_CHECKED [message #276943 is a reply to message #276940] Sat, 27 October 2007 03:59 Go to previous messageGo to next message
Vizith
Messages: 32
Registered: October 2007
Location: bangalore
Member
YES VAMSI ,KNOW I REMOVED IT ,guess its working know but the trigger is firing when i change the trigger only because iwritten iit in when_checbox_changed trigger,but i want it like
when check box checked but i could nt find that trigger,neways now i am trying it,will inform u the status after checkin tht
thnks alot vamsi
regds
vizith
Re: WHEN_CHECKBOX_CHECKED [message #276948 is a reply to message #276943] Sat, 27 October 2007 04:35 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Vizith, OraFAQ Forum uses plain English in communication. Please, use it. If you aren't sure whether your message is correctly written or not, use the "Spell-check Message" button which will show mistakes you've made. Fix them and post a message that is correctly written. Garbage like
Quote:

will inform u the status after checkin tht
thnks alot vamsi
regds
will not be tolerated. Read the OraFAQ Forum Guide to learn how to behave here.

As of a problem you have (the IF construct several messages above): I'm not sure you are certain of what you really want to do. I'd suggest you to think it over, then make it work, and later make it fancy.

A hint: what does [ :TNQ_OPM_MIT_HDR.MDTN = 'M' AND :TNQ_OPM_MIT_HDR.DOC_TYPE = 'OTN' ] have to do with a checkbox? Is it necessary here? If so, where? Before checking the checkboxe's status
IF :mdtn = 'M' AND :doc_type = 'OTN' THEN
   IF CHECKBOX_CHECKED('mdtn') THEN 
      ...
or after
IF CHECKBOX_CHECKED('mdtn') THEN
   IF :mdtn = 'M' AND :doc_type = 'OTN' THEN
      ...

Also, read what is written, do not interpret it the way you think it is written. Could you point me to a post where I've said
Quote:

little foot asked me to add ':' to that statement
Re: WHEN_CHECKBOX_CHECKED [message #276957 is a reply to message #276948] Sat, 27 October 2007 05:13 Go to previous messageGo to next message
Vizith
Messages: 32
Registered: October 2007
Location: bangalore
Member
dear littlefoot,

i am so sorry for my misunderstanding,its not your mistake i realised it later.and thank you so much for the need ful it is working know.And here after i will go through the spell check and send the reply

regards
vizith
Re: WHEN_CHECKBOX_CHECKED [message #276970 is a reply to message #276957] Sat, 27 October 2007 10:22 Go to previous message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
You can use the Capitals, when required. Forum Guide didn't say that to post in small letters only.

By the way, did you want to write 'now', whenever you wrote 'know'?

By
Vamsi
Previous Topic: Expanding width in web form layout in 10g
Next Topic: frm 499815,global.n_lang_code
Goto Forum:
  


Current Time: Fri Apr 26 01:18:24 CDT 2024