Home > Designing and creating databases > Creating scripts to automate tasks > Scripting with Apple events (OS X) > Apple events error: "Set Data failed. Invalid data was supplied" (-17005)
Apple events error: "Set Data failed. Invalid data was supplied" (-17005) This error occurs when you enter data into a field in the wrong format or when you enter a value in a field that does not meet validation criteria set in Manage Fields. This error can occur when you issue a set data, create record with data, or paste command to enter: • blank value in a field defined as "Not Empty" • duplicate value in a field defined as "Unique" • non-existing value in a field defined as "Existing" • value not in the range defined for a field • value that does not match the type validation To correct the error: 1. Check the validation options that may be defined for the fields you are manipulating. 2. Examine the format of the data you are pasting and the format of the field. Do they match? Field type Accepted format Example Date month/day/year Note This is different from AppleScript's default date format, for example, "Monday, November 10, 2014 4:23:26 PM". 11/10/2014 Time hours:minutes:seconds 07:15:45 PM Timestamp month/day/year hours/minutes/seconds format 11/10/2014 08:24:53 AM Note Container fields will accept QuickTime movies, TIFF, PICT, EPS graphics, PDF files, sounds, and text.