Jump to content

This topic is 5494 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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?

Posted

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

This topic is 5494 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.