cancel
Showing results for 
Search instead for 
Did you mean: 

Text Object - Conditional Formatting

former_member1107312
Participant
0 Kudos

Hello,

I have inserted two text boxes in my document that I would like to have conditional formatting.  If a fieldname in my database equals to something then I want to have the textbox font color to change.  I have it working for my background, but I don't see it for the font color itself.


Or even if I can have my text box hide and unhide if the conditional is meet also for the fieldname. 

I tried to search for this online and came up empty handed.  If anyone can help I would appreciated it.

Thank you,

Gerald

Accepted Solutions (1)

Accepted Solutions (1)

former_member203168
Active Participant
0 Kudos

Hi Gerald,

As per my knowledge, we can Hide/ Show the text boxes based on a condition but there is no option for change font color dynamically for a Text box.

To show/hide your text box, then right click on the text box in suppress formula editor write your logic..

OR You can achieve this using HTML Text

if {database_field} = Condition then   

   "<p><b><font color='#00559c'>" & [Data] & "</font></b></p>"

Else

    "<p><b><font color='#00559c'>" & [Data] & "</font></b></p>"

OR use formula instead of Text box and then right click on the Formula filed > font tab> color [X-2], write your logic here.

--Praveen G

former_member1107312
Participant
0 Kudos

I don't see the option for x-2 for font there.

abhilash_kumar
Active Contributor
0 Kudos

As Praveen said, you don't get that option for Text Objects.

Here's the workaround:

1) Remove the database field from the text object

2) Drag and drop the database field on one of the sections > Right-click and select Format Field > Font tab > Click the formula button beside 'Color' > Type in the conditional color formula you have for the Font Color

3) Drag and drop this formatted database field inside the Text Object (that is formatted to conditionally color the background)

-Abhilash

former_member1107312
Participant
0 Kudos

This text object isn't coming from my database.  It's one that I inserted and created on the document.

abhilash_kumar
Active Contributor
0 Kudos

If you've not inserted a database field in this text object, I'm sure there is atleast some text that you might have typed into it?

Move that text you typed in the text object to a formula field.


Follow instructions from my previous reply on how to format and insert it back.


-Abhilash

former_member1107312
Participant
0 Kudos

Thank you for the information

former_member1107312
Participant
0 Kudos

Thank you.

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Gerald,

On what condition would you like to change the color?

What formula have you used for the font color?

-Abhilash

former_member1107312
Participant
0 Kudos

Here is my formula: if {v_Users.GroupName}="SHIPPING" then crYellow Else crNoColor; textbox name = Text3