Filemaker | set cell "fieldName" to | just puts first line o' data in

I have a filemaker (advanced 11) solution that should manage a bunch of PDFs that are right now in a folder. The big idea needs some help at the first point… I want to pull into filemaker a list of the files (I think I can parse out and interpolate the file locations so I can point the Web Viewer to the PDFs…) but getting that list of file names into Filemaker so I can massage it has me beat.

the script finally runs and gets something into the field “gCatchAppleScriptMatter” but instead of the list of 3 in my test folder:
GaAsInternalFluorescense.pdf
Simulating Sunlight.pdf
Study_on_Laser_Parameters.pdf

instead it just drops in:
GaAsInternalFluorescense.pdf

so for those of us who see this as glass 1/3rd full (or 2/3rds empty) how can I change the script?

In the AppleScript Editor the Tell Finder action gets the reply I thought was groovy:
→ {“GaAsInternalFluorescense.pdf”, “Simulating Sunlight.pdf”, “Study_on_Laser_Parameters.pdf”}
then when I turnaround and use “theItem” which I thought contained the above… all I get is the first element of it.

tell application "Finder"
	set source_folder to choose folder with prompt "Please select directory."
	
end tell
tell application "Finder"
	set theItems to name of every item of folder source_folder
end tell
tell application "FileMaker Pro Advanced"
	tell current record
		set cell "gCatchAppleScriptMatter" to theItems
		
	end tell
end tell

Thanks In advance for your kind council

Model: MacBook Pro
AppleScript: 2.1.2
Browser: Firefox 10.0.2
Operating System: Mac OS X (10.6)

Hi,

The groovy syntax { . } represents a list of something, Filemaker expects just text,
so the list must be coerced to text


set source_folder to choose folder with prompt "Please select directory."
tell application "Finder" to set theItems to name of every item of source_folder
set {TID, text item delimiters} to {text item delimiters, return}
set theItems to theItems as text
set text item delimiters to TID
tell application "FileMaker Pro Advanced"
	tell current record
		set cell "gCatchAppleScriptMatter" to theItems
	end tell
end tell


:smiley:

Sweet speedy resolution!

I can’t quite make out exactly how it works… but work it does!
(and I’ll dig in further for my edification)

thanks Stefan K!

(what follows is a note to try and help make this thread more useful to those who follow)
this is a classic case of a help that will not index usefully for those hunting for solutions as the original was worded idiosyncratically and now that i have at least some of the correct terms the challenge is to lard this part up with terms that will bring folks who had my problem to this discussion when they search.

here is a go:
Set cell in filemaker Pro
Set cell in Filemaker Pro Advanced
set cell in Filemaker
partial answer
partial result
expected a list
unexpected result

(I’ll try the tags too - feel free to ping me on making those better)