-
Notifications
You must be signed in to change notification settings - Fork 12
Common Errors
mech edited this page May 31, 2016
·
4 revisions
- 101 (Record is missing) - As the recid is incremental, if we create a record that has error, it will not be saved and thus the recid has been used and thrown away. You can expect a black hole here.
-
102 (Field is missing) - Please check your
fm_name
to see if the field name is spelled correctly. - 303 (Database schema is in use by another user) - This happen when database designer is modifying the field options and in the process of defining the database schema.
- 401 (No records match the request) - The query does not match anything returned from FileMaker. Usually, we will just return an empty array.
- 8003 (Lock conflict with database users or other error) - Undocumented error code. This happen often when client is still editing the record when we try to save it?
If you want to search for email, you need to use \@
to escape it:
User.where(email: 'bob\@example.com')
If the field type is Date
or DateTime
, you can pass in a string like 2016
to search for year 2016 or 2/2016
for Feb 2016 records. We will pass through any String
and not convert it to date/time.
If you want to search for all today's records, you may be tempted to do:
Model.where(created_at: Date.today)
However, this will take into account hours:minutes:second which is unlikely what you want. Instead you can do this:
Model.where(created_at: Date.today.strftime('%m/%d/%Y'))