IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#37448 - 10/06/11 02:29 AM Variable text colour
tibenj Offline
OL Newbie

Registered: 08/15/11
Posts: 5
Hi, my name is Ben, first post but learned a lot here.

In Print Shop mail 7, I have a background image changing and text and other variables on top of that.

As the text could be difficult to read with the change of background, my question is:
Is there a way to change the colour of a text as a variable? (i.e. according to the background change)

Thanks.
B

Top
#37454 - 10/06/11 09:01 AM Re: Variable text colour [Re: tibenj]
Eric Lachance
Unregistered


Ben,

There's no way to do it according to the image itself (as in, there's no "automatic color picker"). There may be a workaround, though it requires a bit of work.

First, store the contents of the text you want to display inside a variable. Let's call it @MyText@. The text itself can call other variables using @myvar@ and database fields using [fieldname].

Then, create the text object where you want that text to appear, and type in a series of variables, one for each color you want ot display, for example @ShowTextBlue@@ShowTextPink@

You then need to apply a certain logic within each variable that will make all the text appear, or nothing at all. So, if the image is displayed depending on a client's sex for example, you'd do this for @ShowTextBlue@:
IF([Sex] = "M", @MyText@, "")
and for @ShowTextPink@:
IF([Sex] = "F", @MyText@, "")

And finally, you just select each variable and choose a color for it, e.g. putting @ShowTextBlue@ in blue.

It's not the most elegant solution, but it should work for your purposes.

Top
#37463 - 10/06/11 05:54 PM Re: Variable text colour [Re: ]
tibenj Offline
OL Newbie

Registered: 08/15/11
Posts: 5
Thanks a lot Eric,

Yes that should work I will try that right now.

In my case the variable images are depending on a record ID number in my database. It will be easy to do the logic formula then.

I have to say that I needed a fresh eye on that one!

Top
#37483 - 10/12/11 07:45 AM Re: Variable text colour [Re: tibenj]
Tyran van Zyl
Unregistered


If it were me, depending on your rule to select a dark or light background, I would have 2 layouts with only one of them printing per record, using that variables to chose either the light one or dark one.

Then each layout can have its own text colour

Top
#37542 - 10/18/11 01:52 AM Re: Variable text colour [Re: ]
tibenj Offline
OL Newbie

Registered: 08/15/11
Posts: 5
The first option works pretty well at the moment, but I have an other question related:

Here's what I use for one colour:
I call the expression below "RED" and I apply the red colour on it. The colour change is related to the subscriberID. My text with the colour change is @TextColour@.

IF([SubscriberID] = "01138", @TextColour@, "") & IF([SubscriberID] = "01156", @TextColour@, "") & IF([SubscriberID] = "01032", @TextColour@, "")

Knowing that I can have more than 3 different SubscriberID for one colour, is there a way not to repeat the "IF" for each SubscriberID?
I would like to have a formula saying: IF subscriberID = 01138 or 01156 or 01032 or...

It would help me especially to do the "average colour" (white) which is the one used by the majority of the records.
I could have a formula saying that every ID which are not equal to the one I used in the different colour variations would be in white.

Thanks

Top
#37543 - 10/18/11 03:57 AM Re: Variable text colour [Re: tibenj]
Sander vd Berg Offline
OL Expert

Registered: 06/10/08
Posts: 207
Loc: Objectif Lune NL
How about:

Code:
IF (CONTAINS("01138 01156 01032", [SubscriberID]), @TextColour@, "")

Top
#37549 - 10/18/11 07:29 PM Re: Variable text colour [Re: Sander vd Berg]
tibenj Offline
OL Newbie

Registered: 08/15/11
Posts: 5
Thanks for your answer, it's working!
I just had to swap SubscriberID and the text to find though:

IF(CONTAINS([SubscriberID],"01138 01156 01032"), @TextColour@, "")

Great forum, thanks guys.

Top