Home » Developer & Programmer » Forms » search (oracle forms 10g)
search [message #487938] Mon, 03 January 2011 12:03 Go to next message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
hi
im newly registered in this site.
i want to search for an employee either by his name or number
i used two radio buttons and a textitem for each one
what i want is that when one of the radio is selected it should enable its textitem and disable the other please help i only have two weeks for graduation . Sad

for your kind support

Re: search [message #487941 is a reply to message #487938] Mon, 03 January 2011 12:36 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Search for SET_ITEM_PROPERTY for use in the WHEN_RADIO_BUTTON_CHANGED trigger.
Re: search [message #487942 is a reply to message #487938] Mon, 03 January 2011 12:37 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You'd use WHEN-RADIO-CHANGED trigger. It would contain SET_ITEM_PROPERTY built-in, which would set item's ENABLED property to TRUE or FALSE.
Re: search [message #488086 is a reply to message #487942] Tue, 04 January 2011 10:42 Go to previous messageGo to next message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
can check this code i wrote but it will still not work
if :NAME_GROUP = 1 THEN
SET_ITEM-PROPERTY('T1',DISPLAYED,PROPERTY_TRUE);
SET_ITEM-PROPERTY('T1',ENABLED,PROPERTY_TRUE);
SET_ITEM-PROPERTY('T2',ENABLED,PROPERTY_FALSE);
elsif :NAME_GROUP = 2 THEN
SET_ITEM-PROPERTY('T1',DISPLAYED,PROPERTY_TRUE);
SET_ITEM-PROPERTY('T2',ENABLED,PROPERTY_TRUE);
SET_ITEM-PROPERTY('T1',ENABLED,PROPERTY_FALSE);
end if;
please help figure out what is wrong thank you

for your kind support
Re: search [message #488087 is a reply to message #488086] Tue, 04 January 2011 10:57 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Describing how it doesn't work would be a good start. What does happen? Do you get an error message?
Why are you setting the displayed property?
Have you read up on the enabled property in form builder help?
Re: search [message #488092 is a reply to message #488087] Tue, 04 January 2011 12:26 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Built-ins name is incorrectly written. It is not

SET_ITEM-PROPERTY
but
SET_ITEM_PROPERTY

Now, back to Cookiemonster's questions (and your answers).
Re: search [message #488093 is a reply to message #488087] Tue, 04 January 2011 12:34 Go to previous messageGo to next message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
no error it just wont disable the other textitem.
so what do you think might be the problem

thank you

for your kind support
Re: search [message #488094 is a reply to message #488093] Tue, 04 January 2011 12:36 Go to previous messageGo to next message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
i did it
SET_ITEM_PROPERTY
still wont work
Re: search [message #488096 is a reply to message #488094] Tue, 04 January 2011 13:15 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Then you need to debug the code.
Put messages in before each set of set_item_property statements and see if the code reaches that point.
Also use messages to display the actual value of NAME_GROUP (and you should really prefix that with the datablock name).
Re: search [message #488189 is a reply to message #488096] Wed, 05 January 2011 10:17 Go to previous messageGo to next message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
i didnt get you can you please explain more and is it possible with code

Thank you

For your kind support
Re: search [message #488198 is a reply to message #488189] Wed, 05 January 2011 10:55 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
message('name_group is set to '||:NAME_GROUP);
message('name_group is set to '||:NAME_GROUP);
if :NAME_GROUP = 1 THEN
message('branch 1');
message('branch 1');
SET_ITEM-PROPERTY('T1',DISPLAYED,PROPERTY_TRUE);
SET_ITEM-PROPERTY('T1',ENABLED,PROPERTY_TRUE);
SET_ITEM-PROPERTY('T2',ENABLED,PROPERTY_FALSE);
elsif :NAME_GROUP = 2 THEN
message('branch 2');
message('branch 2');
SET_ITEM-PROPERTY('T1',DISPLAYED,PROPERTY_TRUE);
SET_ITEM-PROPERTY('T2',ENABLED,PROPERTY_TRUE);
SET_ITEM-PROPERTY('T1',ENABLED,PROPERTY_FALSE);
end if;
Re: search [message #488200 is a reply to message #488189] Wed, 05 January 2011 11:12 Go to previous messageGo to next message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
i added some messages its not like the code is giving any effect to radio buttons
please help really i really want it to work
Re: search [message #488201 is a reply to message #488200] Wed, 05 January 2011 11:16 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Did any of the messages appear?

What trigger did you put the code in?
Re: search [message #488216 is a reply to message #488200] Wed, 05 January 2011 11:47 Go to previous messageGo to next message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
it displays the first message only name group is set to only
thanks
Re: search [message #488221 is a reply to message #488216] Wed, 05 January 2011 11:49 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
So what is name_group set to according to the messgage?
Cause it obviously isn't 1 or 2.
Re: search [message #488222 is a reply to message #488216] Wed, 05 January 2011 11:50 Go to previous messageGo to next message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
when radio changed /radio group level
yes the first message
name_group is set to
Re: search [message #488223 is a reply to message #488222] Wed, 05 January 2011 11:51 Go to previous messageGo to next message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
it does not give me 1 or 2 just the message its self
Re: search [message #488225 is a reply to message #488223] Wed, 05 January 2011 11:53 Go to previous messageGo to next message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
can you tell me how to solve it?
should i set it to another num
Re: search [message #488228 is a reply to message #488225] Wed, 05 January 2011 11:57 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
If you can't see a value then there is none. name_group is set to null.
What values have you actually assigned to the radio buttons in the radio group?
Re: search [message #488246 is a reply to message #488225] Wed, 05 January 2011 13:00 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Sounds like you are checking the value of the radio group and not the radio button. Buttons have values, not the group.
Re: search [message #488249 is a reply to message #488246] Wed, 05 January 2011 14:35 Go to previous messageGo to next message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
it worked i didnt give the radio_button any value
Re: search [message #488250 is a reply to message #488249] Wed, 05 January 2011 14:43 Go to previous messageGo to next message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
Thank you sooo much Smile
Re: search [message #488253 is a reply to message #488249] Wed, 05 January 2011 17:24 Go to previous messageGo to next message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
it worked but i got this number_error FRM-30188can some one tell
me what it is please
thank you
Re: search [message #488254 is a reply to message #488253] Wed, 05 January 2011 17:36 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
You know how we're going to tell what that error is?
By calling up form builder help and entering the error number into the search field.
I'm pretty sure you can do that yourself.
Re: search [message #488324 is a reply to message #488254] Thu, 06 January 2011 07:41 Go to previous message
memua
Messages: 27
Registered: January 2011
Location: riyadh
Junior Member
thanks
Previous Topic: Unable to read list of values...
Next Topic: Implementing folder options in Oracle apps custom form
Goto Forum:
  


Current Time: Fri Sep 20 00:35:06 CDT 2024