8 Replies Latest reply on Mar 10, 2010 7:51 AM by Pebbles






      I'm using FileMaker Pro 10 in Windows XP and i created a database to store family data. My question is I want to auto assigned number in a data field, but I would only like it to populate if and when I enter information in another field. Can anyone help me with the conditional formula that would work in this situation?


      thank you


          Are you saying you want a serial number? Would it need to be in sequence with no gaps? That can get slightly tricky.


          But the basic auto-entry calc for the "data" field would be:


          Case( not IsEmpty( another field ) ; auto assigned number )


          By the way, conditional formatting has a specific meaning in FileMaker, which is to modify the appearance of objects on a layout based on data. Here we're talking about actually modifying data, different topic.


            Thank you....

            but do I enter that calc in the ID field or the text field? I guess I forgot to mention I am new to filemaker pro thanks for the correction....:smileyhappy:




              I dont think this is a good model. An ID should be a background unique identifier that has no meaning. If you do not want the auto-increment serial number to happen until a record is commited, then you can change the option so that it only generates the serial number on commit rather than creation.

              • 4. Re: CONDITIONAL FORMATTING

                Thank you mr vodka..... 


                I tried to do just that but if you can picture a tab with 4 child entries and 4 separate child ID numbers to go with them.  Now if I have an entry with only 2 children the other two are blank but it still generates a child ID number How do I tell it to not commit an ID number if there is no child entry.  

                This is the formula I am using now to generate a Child ID 

                 (COE DATA ENTRY::CHILD 2 ID) + (COE DATA ENTRY::CHILD 1 ID +1)

                This formula gives me the ID number with increments of one but it also does two things: 

                 1. commits a child ID where there is no child information

                 2. It repeats the Child ID number when I create a new record


                Which is not what I want. Any help you can provide is appreciated. 




                • 5. Re: CONDITIONAL FORMATTING

                  Perhaps you can further explain what you needs are verses what you are trying to do and perhaps we can comment or make suggestions on your approach. I am not getting the entire picture yet and from what I have hears so far, it seems that you may be approaching it wrong.

                  • 6. Re: CONDITIONAL FORMATTING

                    Ok... well i have created a database to enter family information. my database consists of tabs one tab is for child data. we want to be able to identify the children that are entered into each record.  One family may have only one child but another might have up to 6 or 7 children.  

                    so we want to give each child a unique number to better keep track of them but we want it linked to the main ID number as well.  

                    Im not sure if I am supposed to create a formula to calculate it in a way where if there are empty child data spaces we do not want a child id number generated. Just for the ones that do have information.  and also when we create a new record the sequence of the child id number duplicates. 

                    • 7. Re: CONDITIONAL FORMATTING

                      Each Record should have its own unique record ID, commonly called a primary key (pk). Then each child should also have a foreign key (fk) which is another number field that stores the ID of the parent record. This could be done with two tables or even a table referring to itself ( self join ).


                      Now in your case, you will want to create a self join because all you really need is a Person table.


                      Your person table could have the following fields for example:







                      A relationship created from a copy of the table occurrence (Person 2 ) would be keyed from Person:: pkPersonID = Person 2::fkPersonID


                      Now you can use a portal to display all the records from the Person 2 relationship.


                      You will just need a way to either script adding the foreign key or use another mechanism such as a drop down list etc.



                      Furthermore, this article may be overkill for your needs but it will give you some ideas in case you need to get more elaborate.







                      • 8. Re: CONDITIONAL FORMATTING

                        Many thanks to you Mr Vodka.... I will try that.