AS_Folder_List ( FolderPath ; invisibles ; global_result_field )
list the content of a specific folder and returns the result to a FileMaker global text field. (Mac OS X only, AppleScript)
Average rating: 4.5 (17 votes) Log in to vote
Thomas Siebert - Show more from this author
http://www.t-seabird.de |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
list the content of a specific folder by returning it into a FileMaker text field
FolderPath = the path for the folder to list its content
invisibles = list also invisible items
result_field = the FileMaker field to return the result ( table::field ) using the current record.
Use the ScriptStep "Perform AppleScript" using the option "Calculated AppleScript"
You also shall use "Perform AppleScript" directly from a button.
Die CF wird über den Scriptschritt "AppleScript ausführen" mit der Option "Berechnetes Script" genutzt.
"AppleScript ausführen" steht auch direkt in den Tastenkommandos zur Verfügung.
Comments
Thomas Siebert Dec 14, 2016 |
||
the CF now accepts either: table::field or "table::field" to deliver the field for the result returned. |
||
Thomas Siebert Jan 19, 2017 |
||
error message appears if no record is present or if path is not valid | ||
Thomas Siebert Apr 22, 2017 |
||
now the result field has to be a global textfield of any table. | ||
Thomas Siebert Apr 22, 2017 |
||
the function has been renamed | ||
Jon Jeffery, Linear Blue Jun 27, 2019 |
||
Note, in FM17 and later you have to have the fmextscriptaccess extended privilege checked, to allow AppleScript to write back to FileMaker | ||
Robert, Luxembourg Europe Jun 6, 2020 |
||
Is it possible to have the result in a variable? | ||
Thomas Siebert Jun 7, 2020 |
||
you can take the result from the global field and copy it to a variable. AppleScript in FileMaker has no command or function to set a variable. It is possible to use the AppleScript command from the mbs plugin but if you use the plugin you have also the file and folder functions of the plugin. |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.