Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

refreshing indexed calculated field

Featured Replies

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:

student_id_futureClass

If (

get(currentDate) > class_date;"";

student_Id

)

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.

This could probably be solved with a multi-predicate relationship.

  • Author

What do you mean by that?

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.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.