These forums will be permanently set to read-only mode on July 18, 2022. From that day on, no new posting or comment will be allowed on the site, but the historical content will remain 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
#58205 - 12/10/21 11:28 AM Can't save file due to / in variable
Derek Toronto Offline
OL Newbie

Registered: 08/19/10
Posts: 18
I'm trying to split a pdf and save into individual files but sometimes in the fields I'm extracting for the file name there is a / in the data. Is there a way to replace the / in the variable. I'm using Set Job Infos and Variables to populate the variables.

#58206 - 12/10/21 12:58 PM Re: Can't save file due to / in variable [Re: Derek Toronto]
RobertOtis Offline
OL User

Registered: 08/26/13
Posts: 90
Loc: Montreal,Quebec
Dear Dereck,

You can use a run script step to remove the char from your string (variable), here a sample javascript,

var s = Watch.getvariable("variable");
s= s.replace('/',' ');
Watch.setvariable("variable", s);

Edited by RobertOtis (12/10/21 01:43 PM)