Home » Developer & Programmer » Forms » Set Text Item visible to false if it's contents are null
Set Text Item visible to false if it's contents are null [message #243391] Thu, 07 June 2007 03:28 Go to next message
irlrobins
Messages: 5
Registered: June 2007
Junior Member
Hey all,

Forms noob here so apologies if this seems the most basic of questions.

I have several text items on a form. What I want to do is hide some of them if they do not contain any text (or null). I know I need to use

set_item_property('datablock_name.textitem_name',visible,property_true);
but I just can't work out how to do a check to see if it's contents are null or not.

 if textitem_name is null then
      set invisible
      end if;




Any help appreciated!
Re: Set Text Item visible to false if it's contents are null [message #243401 is a reply to message #243391] Thu, 07 June 2007 04:00 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Is it an assignment?
if :datablock_name.textitem_name is null Then
set_item_property('datablock_name.textitem_name',visible,property_false);
end if;
Re: Set Text Item visible to false if it's contents are null [message #243414 is a reply to message #243391] Thu, 07 June 2007 04:21 Go to previous messageGo to next message
irlrobins
Messages: 5
Registered: June 2007
Junior Member
Thank you for your relpy.

Yes I got that part but I just can't seem to get it to trigger. Which trigger should I be using when the tab is first viewed by the user?

And it's not an assignment, trying to fix something with an inhouse bespoke app. Normal guy is out so I'm trying to fix. Confused
Re: Set Text Item visible to false if it's contents are null [message #243595 is a reply to message #243391] Thu, 07 June 2007 20:27 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

try to put it on block's post-query.
Re: Set Text Item visible to false if it's contents are null [message #243664 is a reply to message #243391] Fri, 08 June 2007 05:18 Go to previous message
irlrobins
Messages: 5
Registered: June 2007
Junior Member
Cheers, that did it.

Thanks very much
Previous Topic: Passing control to another window.
Next Topic: DYNAMICALLY SETTING ITEM PROPERTY
Goto Forum:
  


Current Time: Wed Dec 07 14:36:34 CST 2016

Total time taken to generate the page: 0.17832 seconds