AnsweredAssumed Answered

How to auto-enter a serial number just in a set of related records

Question asked by jthulin on Nov 18, 2010
Latest reply on Nov 18, 2010 by philmodjunk

Title

How to auto-enter a serial number just in a set of related records

Post

I'm a veterinarian and amateur FMPro developer. I'm using FMPro to build an animal health record db. There are several tables, e.g., the main animal record (name, species, DOB, etc.), a problem table for listing the medical problems for each animal, treatment table, and others. So in the animal record layout I have a portal set up that shows the related medical problems for the particular animal; the problems for each animal are numbered sequentially beginning with 1. What I'm stuck with is how upon creation of new problem record in the portal for the new problem number to be auto-entered. Of course I know how to auto-enter a serial number, and indeed I do have a "ProblemID" field that assigns a serial number for each problem created in the system. However, I don't know how to script for the auto-entry of the next number in just the related set of records. For example, Fluffy has two medical problems, and upon creation of the next problem for Fluffy, I want an auto-entry of the number "3". Does anyone have a the solution to this? Thanks much.

Outcomes