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)

Page 1 of 2 1 2 >
Topic Options
#40529 - 09/04/12 01:46 PM Storing Variables
Sal Offline
OL Newbie

Registered: 08/02/12
Posts: 11
In a text file I have flags setup for email, fax, or both (E+,F+,B+). Based off the flag I would like to store the word
Quote:
email
or
Quote:
fax
as a variable and use the variable to show on an email using the Image connector. I would like to know the best solution on how to set this up. Thank you.

Top
#40552 - 09/05/12 11:16 AM Re: Storing Variables [Re: Sal]
jim3108 Offline
OL Expert

Registered: 04/19/10
Posts: 316
Loc: London, UK
I am not sure I fully understand what you mean but if I am understanding you correctly then you could just have a condition which detects where it is an email or fax from your flags and shows a text field accordingly. This will be done within the document and doesn't require passing anything else to Image.

If you are trying to link the 'email' address to the Image service then you simply need to tick the box in the text field's properties which tells PP that this is an 'email' field or 'fax' etc.

Let me know if this is not what you mean...?



Edited by jim3108 (09/05/12 11:16 AM)

Top
#40570 - 09/06/12 05:33 PM Re: Storing Variables [Re: jim3108]
Sal Offline
OL Newbie

Registered: 08/02/12
Posts: 11
Sorry I was in a hurry. I will explain. In PP workflow using the Image Connector, I would like to show the word email or fax based off of flags E+,F+,or B+ that are in the text file. Hopefully I make more since.

Top
#40573 - 09/06/12 05:54 PM Re: Storing Variables [Re: Sal]
jim3108 Offline
OL Expert

Registered: 04/19/10
Posts: 316
Loc: London, UK
Where do you want to show the word 'email' or 'fax' - on the document or in the filename?

Top
#40583 - 09/07/12 01:08 PM Re: Storing Variables [Re: jim3108]
Sal Offline
OL Newbie

Registered: 08/02/12
Posts: 11
Neither document or filename. On the email that is sent using the Image Connector in workflow.

Top
#40585 - 09/07/12 01:39 PM Re: Storing Variables [Re: Sal]
wags Offline
OL User

Registered: 06/07/11
Posts: 69
Loc: New York
If those flags are always in the same place, you can add a Local Variable to your process (right-click the process > Insert > Insert Local Variable). Add the "Set Job Infos and Variables" action and point the variable to the flag location. Then you can reference it in any of the red/burgundy colored fields in the Image Connector settings.

Top
#40590 - 09/07/12 03:46 PM Re: Storing Variables [Re: wags]
Sal Offline
OL Newbie

Registered: 08/02/12
Posts: 11
This maybe a dumb question.... If the flags are in one spot but change dynamically, is it possible to change the label dynamically? For example: If flag is F+ then label is Fax. I understand what you are saying wags but not sure if I can apply it to dynamically changing the labels.

Top
#40591 - 09/07/12 04:10 PM Re: Storing Variables [Re: Sal]
wags Offline
OL User

Registered: 06/07/11
Posts: 69
Loc: New York
I think you may need to use the Run Script action. It'll accept VBScript, JavaScript, Perl and Python. If you're on Windows, I would stick with one of the first two.

Your script would need to check the value of the flag, then have the appropriate cases set up with the logic to apply a new value (the full word) to either the same variable or a new one.

Here's a crude JavaScript concept:


Code:
var flag;
flag = Watch.GetVariable("flag_local_variable_name");


Then do your logic... something like:
Code:
if flag = "f" then flag = "Fax"


and then update the actual PlanetPress Watch variable

Code:
Watch.SetVariable("flag_local_variable_name", flag);


As you step through the process you should see the value update in the Debug Information pane.

Top
#40592 - 09/07/12 04:32 PM Re: Storing Variables [Re: wags]
Sal Offline
OL Newbie

Registered: 08/02/12
Posts: 11
I will give it a try. Thank you wags.

Top
#40599 - 09/10/12 10:15 AM Re: Storing Variables [Re: Sal]
Raphael Lalonde Lefebvre Offline
OL Expert

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

You don't necessarely need a script. You could just add a branch, and in that branch, use a Text Condition that would look at a place in your data. If it finds "F+", it goes to a True branch where you use a Set Job Info and Variables to set the variable. Otherwise, it goes to a False branch, where you can add more Text Conditions, or just set the variable to a default value. Then, it will go back to your main branch, where you can do whatever you need to do with the variable.

Regards,
Raphaël Lalonde Lefebvre

Top
Page 1 of 2 1 2 >