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
#56440 - 10/25/18 04:49 PM word wrap
Wladson Offline
OL Newbie

Registered: 01/16/18
Posts: 21
Hello, I am using a data selection in the PP designer that receives a global variable from the PP office to display a string, however this string has a line break that is not considered in the data selection, so I think if I used the object text would be displayed correctly. The question would be: what is the syntax for displaying a global variable in a text? tried several ways without success

Top
#56457 - 10/26/18 08:58 AM Re: word wrap [Re: Wladson]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Hi Wladson,

There is no "syntax" per-se. Just create a new text box, and then in it's "text" properties, right-click in the text area and choose "Select Data". You can then select variable data, and it'll automatically insert it in the text box.

Hope that helps!

Regards,
Raphaël Lalonde-Lefebvre

Top
#56459 - 10/26/18 09:22 AM Re: word wrap [Re: Wladson]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 681
Loc: Québec, Canada
As my colleague mention..no specific syntax. Simply right-click in the Text object->Global variables->String and select you global variable.

Now you mention that you receive your string from the PP Office. Do you mean that it is Workflow (PlanetPress Watch Office) which provides you with a global variable?
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top
#56462 - 10/26/18 09:48 AM Re: word wrap [Re: Raphael Lalonde Lefebvre]
Wladson Offline
OL Newbie

Registered: 01/16/18
Posts: 21
Hi Raphaël,

maybe I have not been clear enough, let me explain in another way to make sure I got to say what I need:

At PlanetPress Office, I know it's possible to create global variables, assign values, and pass these values ​​to PlanetPress Design to display them. I have created a Global variable and then assigns a value "Watch.setvariable"% {global.SampleGlobalVar} "in PP Office. Then in PP Design, I added a" Data selection "component and in the" date "property I I typed = ExpandString ('% {global.SampleGlobalVar}').

Everything worked fine, except that this variable has word wrap content. The information is not displayed with word wrap, so I thought about displaying it in the "text" component, but I could not find a way to display the global variable value. When I type = ExpandString ('% {global.SampleGlobalVar}') in the text property it shows = ExpandString ('% {global.SampleGlobalVar}') as a text and not the contents of the variable.

When trying what you suggested, select data gives me the option to select a file, database, etc, but it would not be the case ... or maybe I'm not doing it correctly.

it is smile

Top
#56463 - 10/26/18 09:57 AM Re: word wrap [Re: Wladson]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Hi Wladson,

I see, so that's what you meant by syntax! Well, here's what you can try instead. In the text box, right-click and choose "variables". Then click Add to add a new variable. Click "Custom data selection", and then type:

=ExpandString('%{global.SampleGlobalVar}')

NOTE: No spaces.

This should do the trick. Note that you won't see the result during form design time, you'll have to actually run it through PP Office to see it work.

Hope that helps!

Regards,
Raphaël Lalonde-Lefebvre

Top
#56464 - 10/26/18 10:04 AM Re: word wrap [Re: Wladson]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 681
Loc: Québec, Canada
In the Text Object, go to the Variables menu->variables.
Add a Local variable
Check Custom data selection
Under String to display put in your = ExpandString ('% {global.SampleGlobalVar}')
Click OK

Back in the text area of the Text object, right-click->Local variable and select you newly created local variable.

At the design time, you will see % {global.SampleGlobalVar} but when previewing it or running it, it will be replace by the proper value.
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top
#56468 - 10/26/18 11:40 AM Re: word wrap [Re: Jean-Cédric]
Wladson Offline
OL Newbie

Registered: 01/16/18
Posts: 21
Wow ! this worked for me. I was trying as a global variable "variables / global variables", but it does not show the "select data custom" option, so it did not progress. When I tried the last tip of the "local variable" I was able to see the "select data custom" and do what I wanted.

Now is there a single question: should I be able to see "select data custom" in the menu "variables / global variables / MyVar" or is this only available in "variables / local variables / MyVar"?

Top
#56469 - 10/26/18 11:51 AM Re: word wrap [Re: Wladson]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 681
Loc: Québec, Canada
It is only available from Variables->Variables...->Local variables->"myVar".

Global variables, in the Design tool, cannot be setup with a dynamic value when declared. That is why you do not have access to Custom data selection. To set them up with a dynamic value, it has to be done in PressTalk.

Although, Custom data selection, are also found in numerous objects like Data Selection, Barcodes, Business graphics, etc.... Pretty much anywhere you have the GUI to add a data selection.
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top
#56471 - 10/26/18 01:47 PM Re: word wrap [Re: Jean-Cédric]
Wladson Offline
OL Newbie

Registered: 01/16/18
Posts: 21
Excellent, thank you for the good explication smile

Top