how to validate list item [message #483517] |
Mon, 22 November 2010 11:09 |
|
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 #483566 is a reply to message #483557] |
Tue, 23 November 2010 01:23 |
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 #483611 is a reply to message #483577] |
Tue, 23 November 2010 08:06 |
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...
|
|
|