#56440 - 10/25/18 04:49 PM
word wrap
|
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
|
|
|
|
#56459 - 10/26/18 09:22 AM
Re: word wrap
[Re: Wladson]
|
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]
|
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
|
Top
|
|
|
|
#56464 - 10/26/18 10:04 AM
Re: word wrap
[Re: Wladson]
|
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]
|
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]
|
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
|
|
|
|
|
|