Restricting number of records
i have a table that I would like to only have one record in it
the user cannot add or delete records and there should always be only one record in the table.
is this possible?
I'm on an iPad and don't have access to the proper syntax, but this can be done with validation. If(Count) . . . Look it up.
Just hide and lock status tool bar.
Add one additinal condition in the script where the user wants to add new record
if count(tables PkID)=1
then exit script
show message "User can't add more than 1 reocrd into this table"
Hope it will work at your end.
The count function won't count the records in your table with that syntax.
In FileMaker advanced, you can install a custom menu for the layout for that table where you have removed the New Record menu option.
yes i know that but its only one layout where i would like to limit the number of records not my whole document and the rest of my tables.
can i have a script run on layout entry that creates a record if there are none and then one on record creation that checks to see if there are more than one records and then deletes the created record?
Only from certain layouts will a user be able to create new records in a specific table. Unless the layout is based on an occurrence of that table or has a portal to that table--which makes no sense if you want to limit it to one record, they will not be able to create additional new records in that table.
If you do have multiple layouts based on this table, you can install the same custom menu on all of them.
Retrieving data ...