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.

Help with FM7 and non-working requests?

Featured Replies

  • Newbies

I'm having a problem entering a value into a FM7 request from applescript. The script I have, basically, is:

 on run

	set myfilename to "Testname.mov"

	tell application "FileMaker Pro 7.0"

		tell database "EPICPhotographs"

			show every request

			delete every request

			set myrequest to create new request

			show myrequest

			set cell "filename" of myrequest to ("==" & myfilename) as string

			find

			try

				return cell "header" of current cell

			on error

				return ""

			end try

		end tell

	end tell

end run 
 

the cell "filename" is a calculated field in the database. when I run this script, I get:

"FileMaker Pro 7.0 got an error: Write access denied."



when I run:

 
 return protection of cell "FileName" of myrequest 
 

I get "formulas protected", and when I run:



 
 return access of cell "FileName" of myrequest 
 

I get "read/write/delete". 



This is the method of searching I've used in the last n versions of FMP, and it's always worked, until now. how can I make my request modifiable so I can input data into this field?



Alternately, I was trying to use :


 show (records whose cell "FileName" is myfilename) 

but I don't know how to detect a failed search from Applescript/AppleEvents in this case.

Any help would be greatly appreciated!

Craig

Are you doing this inside Filemaker or in an external script?

Also, perhaps this is just a type but:

return cell "header" of current cell

doesn't make any sense. Maybe you mean:

return cell "header" of current record

You don't need to show the requests.

"Alternately, I was trying to use :

show (records whose cell "FileName" is myfilename)"

Several things at issue here. Unless you SPECIFY database you are referring to the document - the found set. So if your found set doesn't contain any matching records the statement above won't find them.

You may want to say

get ID of every record of database 1 whose cell "Filename" is myFileName

copy result to IDList

set foundCount to count of IDList

if foundCount = 0

-- do whatever

end if

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.