Home » Developer & Programmer » Forms » Set visibility property for items depending on other items
Set visibility property for items depending on other items [message #600910] Wed, 13 November 2013 14:08 Go to next message
amjad_alahdal
Messages: 102
Registered: October 2013
Location: Saudi Arabia
Senior Member
Hello,
I want to set the visibility setting for an item that I have, the steps should be as the following,
for example
if I have an item that asked,
do you have children ?
if the answer is Yes,
the next item should be visible which let's say, number of them
if no,
the next item should be not visible

I tried to set a trigger for the item I am controlling its visibility which is
pre-text-item and wrote


if 'CHEQUE_TABLE.CHEQUE_RECIEVED'='yes'
then
set_item_property(:SYSTEM.CURRENT_ITEM,visible,property_true) ;
else

set_item_property(:SYSTEM.CURRENT_ITEM,visible,property_false) ;

end if;


but it doesn't seem to be right, ,,,
Re: Set visibility property for items depending on other items [message #600915 is a reply to message #600910] Wed, 13 November 2013 16:13 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This might be because of a wrong syntax; you are comparing a string 'CHEQUE_TABLE.CHEQUE_RECIEVED' with a string 'yes'. Form items are referenced with a colon:
if :cheque_table.cheque_recieved = 'yes' then ...


Also, I'd put that code into a WHEN-VALIDATE-ITEM trigger on CHEQUE_RECIEVED item.

[Updated on: Wed, 13 November 2013 16:14]

Report message to a moderator

Re: Set visibility property for items depending on other items [message #600930 is a reply to message #600915] Thu, 14 November 2013 02:19 Go to previous message
amjad_alahdal
Messages: 102
Registered: October 2013
Location: Saudi Arabia
Senior Member
Thank you ^_^
Previous Topic: WUO-700: Unable to create the OLE Server Word.Application; Exception com.jacob.com.ComFailException
Next Topic: Tracking Remote Desktop access using Oracle
Goto Forum:
  


Current Time: Thu Mar 28 12:42:49 CDT 2024