September 7, 200718 yr I am trying to figure out how to auto-enter a date that's a week later than the previous record & found this to use as an example: http://www.databasepros.com/FMPro?-DB=resources.fp5&-lay=cgi&-format=list.html&-FIND=+&resource_id=DBPros000333 I don't understand the relationship in the file, though. There is only 1 table; how was the "Previous Record" table created? Also, what is the difference between --< and >--< thanks!
September 8, 200718 yr There is no previous record table. This is a type of self-join relationship because it relates within the same table. The 'serial' field is set up to autoenter a sequential serial number, and the 'previous serial' field is set up to autoenter the value of the serial field minus one. Hence the 'previous serial' field will contain the same number as the 'serial' field in the previous record. So, if you create a relationship between the 'previous serial' field, and the 'serial' field, it will link all records to their immediately preceding record so that you can extract the data from it. To create a this type of relationship, go to the Relationships section of the Define Database window, and drag from the 'previous serial' field out of the table and then back into the table to the 'serial' field. Filemaker will automatically create a second TO (table occurrence) for you (and will come up with a default name which you can edit). Then, it's just a matter of setting the autoenter formula for your date field. The formula to add a week to the previous date would be something like: Date = MyTable_2::Date + 7 Where MyTable_2 is the name of the second table occurrence.
Create an account or sign in to comment