Skip to main content
Participating Frequently
December 7, 2022
Question

Save as with Prefix from selected field

  • December 7, 2022
  • 3 replies
  • 1632 views

how to script save as button, with the name of existing document with prefix from selected field ?

i do this script and didt work

this.saveAs("/a/test/"this.getField("namaasesi").valueAsString" + this.documentFileName ) ;

This topic has been closed for replies.

3 replies

Participating Frequently
December 7, 2022

Thanks alot it WORK 

try67
Adobe Expert
December 7, 2022

- You can't do that directly from a button. It requires a privileged context.

- You're missing a plus sign before the this.getField part. You also have an unneeded double-quote, after valueAsString.

- Do you have an A drive on your computer?

Participating Frequently
December 7, 2022

yes, i have A drive

Bernd Alheit
Adobe Expert
December 7, 2022

Check the JavaScript console for errors.

Participating Frequently
December 7, 2022

its error and i dont know how to fix it


this.saveAs("/a/test/"this.getField("namaasesi").valueAsString" + this.documentFileName ) ;
SyntaxError: missing ) after argument list
1:Console:Exec
undefined