MAC: save records as pdf in subfolder

Discussion created by hjvanes on Feb 6, 2014
Latest reply on Feb 6, 2014 by hjvanes



On continuous testing I am unable to get my script to save a record as pdf to a subfolder of where the file is stored. Can any person help out pls.


The current script I have is as follows:


set variable $platform; value:Case ( PatternCount ( Get ( SystemPlatform ) ; 1 ) ; "filemac:" ; "filewin:")

set variable $path; value: Get(FilePath)

setvariable $finalpath; value: Let( [p1 = Substitute( $path; "/"; ¶);n = ValueCount( p1);p2 =MiddleValues( p1; 2; n-2);finalpath = Substitute( p2; ¶; "/") & "INVOICE/" ] ;finalpath)

setvariable $filename; value; table::filename -> (field currently stores name as test)

setvariable $output; value; $finalpath & $filename

save records as pdf ["$output"; records being browsed]



Yet if I change the save as erecord to pdf line to

save as records as pdf ["file:$filename] I know it will save the pdf but as everyone would guess...in the location of the solution itself.


The subfolder is located in the same location as that of the solution


Is there a way to get this to work or is this simply it cannot be done?