Jump to content

refreshing indexed calculated field


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

Recommended Posts

I am sure this issue has been hit a million times and I have been looking for an hour for the same post.... now by saying this I know some will post links and say I didn't look... I really did... but here goes:

I have a solution that is for registering for classes and it uses a relationship that show "future" reservations to a field that simple contains a calc:


If (

get(currentDate) > class_date;"";



And the key is from the student table to this field located in registratons table. In the student table, it is making a calculation on how many reservations this student bought, 8, how many the have signed up for, Sum(reservations:boolean), so it is going through the relationship to calc field. Well, we all know that will have to be indexed but in doing so brings out the refresh thing. If the class is at 7:30 pm and they have finished that class and want to take another, it won't refresh to free up a reservation since it is indexed. How do you get around this? I thought of a indefinite script that keeps looping and triggering a refresh but I am servering this to be accessed by php.

Link to comment
Share on other sites

FMP 7 and later allow a relationship to match more than one field, and the match fields don't have to be simple "equals" operators.

In your case, when you want to filter the relationship by date, create a "Date Filter" global field in the Student table. The relationship between Students and Classes will be

StudentID = StudentID

Date Filter > Class Date

Put the current date into the Date Filter field and the related records will be filtered by the date.

This gets rid of the unstored calculation field completely.

Link to comment
Share on other sites

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