|
|
|
|
|
Re: HOW TO SELECT READIO BUTTON DYNAMICALLY..... [message #185879 is a reply to message #185624] |
Fri, 04 August 2006 00:40 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
jowahl
Messages: 82 Registered: May 2006
|
Member |
|
|
i think there are raising problems with this code in the WHEN-NEW-ITEM-INSTANCE trigger of USER_AUTH.USER_NAME:
IF V_STATUS = 1 THEN
/*Radio Button Value Property */
Set_Item_Property('RADIO_BUTTON29',initial_value,'1');
ELSIF V_STATUS = 0 THEN
/*** Change the icon to the execute query icon and get
** into enter query mode. */
Set_Item_Property('RADIO_BUTTON30',initial_value,'0');
END IF;
has to be simply:
:USER_AUTH.RADIO_GROUP28 := v_status;
the INITIAL_VALUE is the default value if you're creating NEW values! in your case you want to set the status depending on database values, so you have to assign the value to the item.
[Updated on: Fri, 04 August 2006 00:41] Report message to a moderator
|
|
|
|
Re: HOW TO SELECT READIO BUTTON DYNAMICALLY..... [message #185939 is a reply to message #185934] |
Fri, 04 August 2006 06:49 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
jowahl
Messages: 82 Registered: May 2006
|
Member |
|
|
just for my understanding, what do you like to do:
you don't set up a query, do you?
the user always starts typing username/password. then you're verifying if this user exists and set the radio buttons?
please desrcribe step by step, it's too confusing for me ...
e.g
1) form starts with empty block
2) user types in username
3) after leaving field this operation check in database if user exists
4) if exists do something .... if not do .....
5) ...
6) ...
thanks!
|
|
|
|
Re: HOW TO SELECT READIO BUTTON DYNAMICALLY..... [message #185983 is a reply to message #185624] |
Fri, 04 August 2006 11:33 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
jowahl
Messages: 82 Registered: May 2006
|
Member |
|
|
o.k. let me see if i got you:
1)
this form is for activating/deactivating users that exist in the database (table USER_AUTH).
2)
if the admin enters a username, you have to check if this user exists in the table USER_AUTH. i can't find this check in your form.
you only have a WHEN-NEW-ITEM-INSTANCE trigger. but it fires also when the admin navigates to the field to enter the username (and fires also when the field is blank) ...??
the code in the WHEN-NEW-ITEM-INSTANCE trigger selects the status from the table USER_AUTH without WHERE (restriction). is there only one row in the table? i think not ...
3)
if my assumptions are right, i'd recommend some changes:
a)
the block (and all items) shouldn't be database based (set block property "Database Data Block"=No
b)
set items properties "Database Item"=No.
c)
i've created a WHEN-VALIDATE-ITEM trigger for you. please check it and make your changes (alerts, ...)
hope this works ...!?
|
|
|
|
|
Re: HOW TO SELECT READIO BUTTON DYNAMICALLY..... [message #186125 is a reply to message #186092] |
Sun, 06 August 2006 04:28 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
RJ.Zijlstra
Messages: 104 Registered: December 2005 Location: Netherlands - IJmuiden
|
Senior Member |
|
|
Hi:
Please runn the following script:
create table t( user_name varchar2(30), status number ,constraint t_ch check( status in (0,1) ))
/
insert into t( user_name, status) values( 'Jan',1)
/
insert into t( user_name, status) values( 'Piet',0)
/
insert into t( user_name, status) values( 'Klaas',0)
/
insert into t( user_name, status) values( 'Karel',1)
/
insert into t( user_name, status) values( 'Rob',0)
/
commit
/
After that, load and run the attached fmb. It will do exactly what you want, and without any hocus-pocus from exotic triggers. Just plain forms functionality; that is ALL you need here.
(Forms version:
Forms [32 Bit] Version 6.0.8.26.0 (Production)
)
HTH,
Regards
Rob Zijlstra
-
Attachment: RB.fmb
(Size: 44.00KB, Downloaded 1286 times)
|
|
|
|