Home » Developer & Programmer » Forms » how to validate list item (form 6i..... window xp)
how to validate list item [message #483517] Mon, 22 November 2010 11:09 Go to next message
maddyd2k
Messages: 24
Registered: November 2010
Junior Member
Hi to all

I am working on form 6i..

I have developed a form with some text items,a list item and a image item...

list item......account_list(values....company,individual)
text_item..... company_name..
text_item.....image_path...

i have attached a pop up menu to image item... Add image and upload image...
When i click on 'Add image' the image path is getting enabled.. it is fine but when i am changing the account_list i need enable and disable the 'Company_name' text item... How can i achieve this??

I have tried it in when-validate-trigger on account_list...
if account_list=individual then
set_item_property('company_name',enabled,property_false);
else
set_item_property('company_name',enabled,property_true);
end if;

But no use of this....

how can i achieve it??

help me..
thanks....
Re: how to validate list item [message #483557 is a reply to message #483517] Mon, 22 November 2010 22:28 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
I don't think the code will compile at all.
Please post the exact code.
Read the Forum Guide. Use tags.

By
Vamsi
Re: how to validate list item [message #483566 is a reply to message #483557] Tue, 23 November 2010 01:23 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Quote:

if account_list=individual then
set_item_property('company_name',enabled,property_false);
else
set_item_property('company_name',enabled,property_true);
end if;


please see below code as a sample.


< KEY-NEXT-ITEM >

if :lit='COMPANY' then
 
    Set_item_property('COMPANY_NAME',enabled,property_false);
    Go_item('C');
 
elsif :lit='INDIVIDUAL' then
	
     IF Get_Item_Property(:lit,enabled) = 'TRUE' THEN
     Set_item_property('COMPANY_NAME',enabled,property_False);
     Go_item('B');
     else
     Set_item_property('COMPANY_NAME',enabled,property_true);
     Go_item('B');

    end if;

end if;




Hopefully it'll help you.

Regards,

Irfan

Re: how to validate list item [message #483576 is a reply to message #483566] Tue, 23 November 2010 03:33 Go to previous messageGo to next message
hedy
Messages: 2
Registered: November 2010
Junior Member
Pls read the Forum Guide. You can use tags.
Have a good day !
Re: how to validate list item [message #483577 is a reply to message #483576] Tue, 23 November 2010 03:37 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Quote:
Pls read the Forum Guide. You can use tags.

You do that first!
"Don`t use IM speak"

sriram
Re: how to validate list item [message #483611 is a reply to message #483577] Tue, 23 November 2010 08:06 Go to previous message
sachin_svaidya
Messages: 15
Registered: March 2006
Location: Mumbai
Junior Member

Hi,

YOu can try this instead of using key-next- Item trigger

<WHEN-LIST-CHANGED>

if :lit='COMPANY' then
Set_item_property('COMPANY_NAME',enabled,property_True);
Set_item_property('INDIVIDUAL',enabled,property_false);
elsif :lit='INDIVIDUAL' then
Set_item_property('INDIVIDUAL',enabled,property_True);
Set_item_property('COMPANY_NAME',enabled,property_false);
end if;

Hope this will solve your problem...
Previous Topic: Cancel Update If Record has been reported
Next Topic: FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA-00932
Goto Forum:
  


Current Time: Thu Sep 19 14:02:23 CDT 2024