February 8, 201016 yr I still have a TON to learn about Filemaker Pro but this problem has me stumped. I have 3 fields Field 1– Book Name Field 2– Revision Field 3- Page Number I want Page Number to increase by 1 with each new record as long as Book Name & Revision stay the same. When either Book Name or Revision changes I want Page Number to reset to 1. How should I do this? Thanks in advance, Angie
February 8, 201016 yr Take a look at script triggers - you will find these in the Set Script Triggers item which appears on the format menu when you are in layout mode. Set a script trigger for your field 1 and field 2 to run when the object is saved (although you may wish to run the script as soon as the value is changed - I'm not sure when the change in the third field should be activated) The script that you run when triggered will change the value in field 3 - e.g. set [database::Field3 = 1] Hope this helps Brian
February 9, 201016 yr Is there enough information provided to answer this correctly? How is a new record created? Is it simply that or are specific conditions/results specified or set in that record by some script/auto enter (e.g Book Name set or looked up)? Is a new record a part-duplicated record? Is the Book Name (and/or Revision) keyed in after the record is created? For determining Page Number is a record containing Book Name with a typo the same as one in which it is correctly spelt?
February 10, 201016 yr Author Thanks for your responses. I can’t seem to get the script trigger I made to work. I will explain more. This will be used for entering book data which is generally multiple pages. The book name is entered, the revision field should stay at 0 unless it is changed to 1,2,3…etc by the user. The page field should start at 1 and increase by 1 with each new record until the book name or revision changes. I have an “add new record” button and a “use duplicate data” button which populates all the other fields based on the previous record. I’ve got a lot of learning to do when it comes to scripts... Thanks again
Create an account or sign in to comment