Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RichText DWO - Conditional Field??

Status
Not open for further replies.

kaul125

Programmer
Jan 29, 2002
87
US
I have a richtext dw obect and I want to conditionally display a field when the query is ran. I have two fields where one field is a yes/no type field and another field I want to conditionally display base on the value of the yes/no field. For example if field_1 is a yes/no type field and it is equal to 'yes', then I want to display field_2. If field_1 is equal to 'no', then I want field_2 to be invisiable.

How can I accomplish this?

Thanks

kaul125
 
In the visible property of field_2 use a statement similar to:
if(field_1[0] = 'no' , 1, 0 )
 
I'm trying to modify the visible property of my column in my code. However, it doesn't seem to be working.

Here is my syntax:

dwo.modify("col_1.visible=1")

Is there different syntax for a RichText Datawindow? Because that is the type of the datawindow I'm using.
 
OK, this is what is happening on my end.

I'm using PB 6.5 and the datawindow is of type RichText Presentation style.

When I created the datawindow, all fields in the sql are displayed in the datawindow. So, if I export the object then the visible property is set to "1". In my code I'm trying to conditionally reset the visible property to "0". When I do this and run the application, I get the following error when it reaches the line of code to set the visible property to "0":

This program has performed an illegal operation and will be shut down.

Now if I export the object and set the visible property to "0" and reimport it, in my code I'm able to reset it to "1" and not get an error during runtime. The above error only occurs when I try to set the visible property to 0(zero) and the exported objects visible property is set to 1.

Also, whenever I change anything in the object it will always reset the visible property of my column back to 1.

This is my modify() statement in my code:

dwo.Modify("col.visible=0")

Why am I getting the error when I try to set the visible property to 0(zero)? When I try to righ-click on the input field, there is no tab with options to set the visible property like it does on non-richtext presentation dw's.

Your help will be greatly appreciated.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top