Cheat Sheet: Using File Maker Pro (FMP) with KM and AppleScript

In KM, while on the current macro, under the ‘triggered by’ top section,
click on 'or by script’
select 'or by applescript’
copy and paste that in the ‘perform AppleScript’ in FMP -

I use FMP a lot and have included my stored ‘cheat sheet’ of commands that I often use between AS and FMP - maybe you’ll find them helpful.

------------------------------------
--AS VARIABLE FROM FMP FIELD
tell application "FileMaker Pro Advanced"
	set First_Name to cell named "First Name" of current record as text
end tell

--AS VARIABLE FROM FMP GLOBAL FIELD ON MY GLOBAL LAYOUT
tell application "FileMaker Pro Advanced"
	set Date_Range to cell named "Variable" of table "Globals" as text
end tell

--SET KM VARIABLE FROM AS VARIABLE
-- ignoring application responses
tell application "Keyboard Maestro Engine"
   setvariable "First_Name" to First_Name
end tell
-- end ignoring

--SET AS VARIABLE FROM KM VARIABLE
tell application "Keyboard Maestro Engine"
  set currentOutputVolume to value of variable "currentOutputVolume"
end tell

-- RUN AS IN FMP FROM ANYWHERE
tell application "FileMaker Pro Advanced"
	--activate
	try
		--show database "MDA"
		--delay 1
		tell database "MDA"
			do script "Quick Find Concat KM"
		end tell
	end try
end tell

--FMP FIELD FROM AS VARIABLE OR TEXT
tell application "FileMaker Pro Advanced"
	set cell named "VariableField" of current record to "YO"
end tell
------------------------------------
2 Likes