chedderslam
Programmer
I am brand new to powerbuilder.
One of my first tasks at my new job is to update some text in an object that is part of an object that generates pdfs.
Currently, it is a plain text control(? is that the proper term?). They need it to display text based upon conditions, either one string of text or the other.
I think there are two ways to do this, and I'm not sure which will work or if it is the proper way to do this...
First, I can go into the text property of the control and add an expression like this:
if( var1 = '5' and var2 = 'something', 'print this string', 'print this other string' )
After adding the expression, the box next to the text attributes turns green, but the text in the box under "Text" in the property window is still there. Do I need to delete this or what? Will the expression do what I want it to do?
The other option is to do a computed field, using the expression I listed above.
So, which should I use?
Thank you.
One of my first tasks at my new job is to update some text in an object that is part of an object that generates pdfs.
Currently, it is a plain text control(? is that the proper term?). They need it to display text based upon conditions, either one string of text or the other.
I think there are two ways to do this, and I'm not sure which will work or if it is the proper way to do this...
First, I can go into the text property of the control and add an expression like this:
if( var1 = '5' and var2 = 'something', 'print this string', 'print this other string' )
After adding the expression, the box next to the text attributes turns green, but the text in the box under "Text" in the property window is still there. Do I need to delete this or what? Will the expression do what I want it to do?
The other option is to do a computed field, using the expression I listed above.
So, which should I use?
Thank you.