Jump to content

Recommended Posts

  • Newbies
Posted

Hello everyone, I'm new to FileMaker and just joined this community. I'm working with FileMaker Pro and learning scripting. Looking forward to learning from the experienced members here. Thank you for having me!

ario

 

Hello,

I'm having trouble with a FileMaker Pro script. I need to save records as PDF using a variable for the file path, but I can't get the variable to work properly.

My script setup:
- Line 15: Set Variable [$percorso; Value: Get(DesktopPath) & $nomeFile & ".pdf"]
- Line 18: Save Records as PDF [No dialog; $percorso; Current record; Create folders: Off]

**The problem:** When I try to specify the output file path using $percorso, FileMaker keeps adding quotes around it, treating it as literal text instead of a variable.

I've tried:
- Typing $percorso directly in the file path field
- Using the calculation editor
- Different approaches in the "Specify Output File" dialog

**Question:** What's the correct way to insert a variable in the file path without quotes?

Any help would be greatly appreciated!

Thanks in advance.

Posted
9 hours ago, Rosario de giovanni said:

When I try to specify the output file path using $percorso, FileMaker keeps adding quotes around it

Does the saved file actually have quotes in its name?


Or is it just that you see the quotes in the script step itself, like this:

image.png.b96e42cb9f81256613322e8a79699452.png

If it's the latter, just ignore the quotes. It's only a cosmetic imperfection of the script editor.

 

  • Newbies
Posted

Thanks. So it doesn't affect the result. I thought it was the cause of the PDF not being saved with the member's name (as I would like it to do).

Posted
7 hours ago, Rosario de giovanni said:

PDF not being saved with the member's name

So what exactly does happen? Is the PDF saved under another name, is there an error message, or ... ? And did you check the contents of $nomeFile (which you don't show us being populated)?

 

  • Newbies
Posted (edited)

Scusate, non avevo letto. Il problema del supposto errore a causa delle virgolette è stato risolto. Adesso non riesco ad andare avanti a causa dell'avviso allegato. Preciso che FileMaker ha accesso completo al disco.

Screenshot 2025-05-31 alle 17.07.28.png

Edited by Rosario de giovanni
completo con altre info. Forse l'errore è nello script dove il valore della variabile $percorso è (PercorsoDesktop)?
Posted
1 hour ago, Rosario de giovanni said:

[Google Translate]: The issue with the supposed error due to the quotes has been resolved. Now I can't proceed because of the attached warning. I would like to point out that FileMaker has full disk access.

I suggest you add a Pause/Resume Script step just before the Save Records as PDF step.
Then, while the script is paused, open the Current tab in the Data Viewer and examine the values of $nomeFile and $percorso.

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.