Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Path to Variable Folder

Featured Replies

Hi,

 

I have a script that maker a folder based on the product ID (always unique) and then generates several PDF certificates from a FM record.

 

I then have a script that I can choose the folder (choose folder/set result) to combine all the PDF files inside it into 1 file.

 

I'm looking to automate this process fully, by removing the user step of having to choose the folder.

 

I thought it would be a reality simple process of setting the  variable FolderName to the ProductID as I have for making the folder, but I'm getting -1727 errors, parameter is not an object specifier.

 

I feel that I'm quite close to a working solution, but I'm stumbling on something.

 

Any advice would be greatly appricatied.

 

Regards,

 

Skip

 

 

 

set workflow_path to "/Users/skipi/Desktop/CombinePDF.workflow"

 

tell application "FileMaker Pro Advanced"

set FolderName to cell "Product ID" of current record

end tell

 

 

set the theFolder to "Fusion:Users:skipi:Documents:TempCertsFolder:" & FolderName as alias

 

 

repeat with this_folder in the theFolder

 

-- get name and posix path of a folder

tell application "System Events"

set the folder_name to the name of this_folder

set the folder_path to POSIX path of this_folder

end tell

 

-- call automator workflow to process pdfs

do shell script "automator -D NewName=" & quoted form of folder_name & " -D FolderPath=" & quoted form of folder_path & " " & workflow_path

 

end repeat

Solved by Skipi

Go to solution
  • Author
  • Solution
Sorted.
 
 
set workflow_path to "/Users/skipi/Desktop/CombinePDF.workflow"
 
tell application "FileMaker Pro Advanced"
set FolderName to cell "Product ID" of current record
end tell
 
set thefolder to  "Fusion:Users:skipi:Documents:TempCertsFolder:" & FolderName as alias
 
 
set the this_folder to thefolder
 
 
-- get name and posix path of a folder
tell application "System Events"
set the folder_name to the name of this_folder
set the folder_path to POSIX path of this_folder
end tell
 
-- call automator workflow to process pdfs
do shell script "automator -D NewName=" & quoted form of folder_name & " -D FolderPath=" & quoted form of folder_path & " " & workflow_path

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.