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.

Cannot Create New Record

Featured Replies

I am trying to read in the titles of files in a folder, add records to a FM database and fill in a field with the title of each of the files. I cannot get the command to create a new record to work. I have searched this forum as well as other internet resources with no success.

At the "create new record" step, I get the "Set Data failed. Invalid data was supplied" error. What am I messing up here?

-----------------------------------------------------

copy (choose folder) to foldername --select the source folder

copy (list folder foldername) to folderstuff

copy (count of folderstuff) to thecount

copy {} to fileList

repeat with num1 from 1 to thecount -- copy the aliases of the text files to FileList

copy ((foldername as string) & item num1 of folderstuff) to myfile

copy fileList & (myfile as alias) to fileList

end repeat

tell application "FileMaker Pro"

tell database "metaDataEntry.fp7"

show layout "metaDataEntry"

repeat with fileName in fileList --now process the files in FileList

{name} of (info for fileName) returning {shortname}

--tell application "FileMaker Pro" to tell window (my FileLoggerDB)

tell table "metaDataEntry"

display dialog "Before Create" buttons {"Cancel", "Okay"}

set thisRecord to create new record

display dialog "After Create" buttons {"Cancel", "Okay"}

show thisRecord

--set cell "Title" of current record to shortname

save -- if you don't do this, you run into trouble after processing long file lists

end tell

end repeat

end tell

end tell

------------------------------------------------------

Thank you very much for your help,

Nancy

I have test the follow script :


set thenumber to : 500

tell database "metaDataEntry.fp7"

	show layout "metaDataEntry"

	repeat  thenumber times

		tell table "metaDataEntry"

			set thisRecord to create new record

			show thisRecord

			save

		end tell

	end repeat

end tell

And I have no error.

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.