Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Can I control when a field value is calculated?


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

Recommended Posts

Posted

Hello

I have a peculiar problem I cannot see the solution of:

I have a database where users are creating records via the web. I would like to "mark" the first record of a given type, but not the following of the same type, so that I can search for all the "first records" - You get the idea?

I have a field that counts how many there are it is of its type (counts numbers of a relation). What I need is to "freeze" this value in another field, so that when there is only one relation (meaning it is the first of its kind), this field gets the value 1, and when the next is created, this will get the number 2 and so on.

I thought i could do it by calculating it (if the counter is 1, set value 1, else set value 0), but the field is calculated when the record is created, BEFORE the relation is counted, so the relation is, in the eyes of the calculation field, always =0!

Is the any way to tell a field to calculate its value AFTER a value has been entered into another field?

Posted

A calculation field, if unstored, will recalculate when any of its operands change. So, unless I'm misunderstanding your problem, just change the storage option for your calculation field.

Posted

Thanks for your comments! And: I found an elegant solution to the problem myself - in the help file for Filemaker! See the item: "Finding duplicate values using a self-join relationship" A simple and elegant solution for marking the first record of a type with one value and the following with another value.

This topic is 7329 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.