Skip 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.

Change calculations into a script?

Featured Replies

Hi everyone!

We're facing a big problem. We have a huge database considering family history. People filled in a questionnaire about their family (mother, father, grandparents and siblings) history.

This data is put into a database, without any problem. Now to be able to use this data, we made new columns based on the original data, by using calculations (for example: in question 1, when people filled in number 5, there is "sudden death", so we made a column "sudden death": "yes"or "no")

The problem is, we have made maybe over 100 columns using calculations (some of them really complicated by using case() and positions () with lots of conditions), the result being that FM pro 10 is REALLY slowing down!! We cannot work with it anymore.

Is there a solution to this problem? Do we have to use scripts? And if so, can we do it easily? Would it be better to make all the fields an auto-enter calculation?

Thanks!

One way as I think you mention, is to change the unstored calculations to their result type, text, number, etc. Then go to the field options and select autoenter, you will find there the original calculation already entered. Enable this auto enter. Then go back to the found set and choose one of the fields used in the calculated result and replace its contents with itself, this will trigger the autoenter and the calculated result will now be stored in its original format type.

  • Author

Thank you for your respons!

1. The problem we're facing now is that filemaker pro does not want to make an auto-enter calculation if the referenced fields are fields from another related table. What can we do about it?

2.We also tried to make scripts by: "replacing field contents by a calculation", and make the field itself a textfield (instead of a calculation field) which filemaker does perfectly, except he also fills in empty fields. There is no "do not evaluate if referenced fields are empty" checkbox.

Is it possible to use this script, but if the referenced field of the calculation is empty, the calculated result must also be empty.

I hope we made ourselfs clear...

Thank you so much!

There is no "do not evaluate if referenced fields are empty" checkbox.

Not explicitly, but as developer it is a condition that you have to allow for.


Case( 



Isempty( field ) ; "" ; 







)

People filled in a questionnaire about their family (mother, father, grandparents and siblings) history. This data is put into a database, without any problem. ... The problem is, we have made maybe over 100 columns using calculations ... We cannot work with it anymore.

I have the feeling that your solution might not be optimal and that you have multiple 'like' fields and structural issues. This could add to the complexity and then slow your solution down and thus require more calculations to make it all work together.

You might consider providing your relational information and fields so it could be reviewed. :smile2:

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.