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.

Featured Replies

  • Newbies

I'm updating a script that was working fine against a FMP 5 Server database, but in upgrading it for a database now on 8 server, I'm unable to show a newly created record using the pointer returned by the create new record command:

This script returns an "Object not found" error:

property dbURL : "fmp7://[email protected]/DBName"



  tell application "FileMaker Pro Advanced"

		activate

		getURL dbURL

		tell database 1

			show layout "New DataEntry"

			set new_rec to create new record

			show new_rec

		end tell

	end tell




The Event Log looks like this:


tell application "FileMaker Pro Advanced"

	activate

	getURL "fmp7://[email protected]/DBName"

	show layout "New DataEntry" of database 1

	create new record

		record id 3.5503E+4 of window "UGlist (PR Database)"

	show record ID 3.5503E+4 of window "UGlist (PR Database)"

		"FileMaker Pro Advanced got an error: Object not found."





The record pointer, then, is 
record id 3.5503E+4 of window "UGlist (PR Database)"
  with "UGList" being the database file name and "(PR Database)" the database name on the server.



However, when I hard code that same record ID without its parent references, the show command works. i.e, 




show record ID 3.5505E+4

succeeds without error.

Also, if I run this against the same database running locally, it succeeds.

Would anyone know why this might be? Has there been changes in the FM 8 dictionary that's causing this?

TIA,

--Chris

  • 3 weeks later...
  • Newbies

Hi Chris

I have recently had the same problem. I posted the question on this site and the MacScripter BBS site (which I got help on).

I refer you to my post below

http://bbs.applescript.net/viewtopic.php?id=19064

but your not going to like it.

I suggest you find another way of displaying the record you need. e.g. show every record whose cell "Record Numbers" is "123456".

As long as this field's value is unique you should get only one record displayed which you can work on.

Hope this helps

Tim

  • Author
  • Newbies

Thanks for that, Tim.

I did consider those suggestions to show the record after its creation, and you're right, I didn't like them ;-) But I guess I'll use one as a workaround for now. I'm just glad to know I'm not the only one banging my head against the wall about this.

I do think, though, that even with served databases that FileMaker does track the record id, as when I hard code the id without its parent reference, i.e.,

show record id 3.5503E+4



instead of




show record id 3.5503E+4 of window "UGlist (PR Database)"

it works.

I would say this is a bug, and I did talk to FileMaker about it. They said they don't officially do support for AppleScript, but did have a look at my post here and said they would pass it along and get back to me, but I've heard nothing back yet.

Thanks, again...

--Chris

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.