397 Views    -    4 Replies


Username Post: Change calculations into a script?        (Topic#213720)
Your continued generosity and support of FMForums is greatly appreciated.
Femca 
novice
Posts: 7

Post Rank (AVG):
            


FMP: 10
OS: Mac OS X Leopard
Skill: Entry Level



Tweet This! Tweet This Post!
   This is Femca's fourth post.
03-09-10 02:06 AM - Post#352018     - Post Rank:             


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!










RodSierra 
apprentice
Posts: 135

Post Rank (AVG):
            


FMP: 10 Advanced
OS: Cross Platform



Tweet This! Tweet This Post!
03-09-10 03:16 AM - Post#352021     - Post Rank:             
    In response to Femca

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.










Femca 
novice
Posts: 7

Post Rank (AVG):
            


FMP: 10
OS: Mac OS X Leopard
Skill: Entry Level



Tweet This! Tweet This Post!
   This is Femca's fifth post.
03-09-10 09:03 AM - Post#352047     - Post Rank:             
    In response to RodSierra

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!










Vaughan 
Mostly Harmless
Posts: 8179
Vaughan

Loc: Sydney, Australia
Post Rank (AVG):
            


FMP: 9 Advanced
OS: Mac OS X Leopard

Member: TechNet
Skill: Advanced

Certified:
     



Tweet This! Tweet This Post!
03-10-10 02:26 AM - Post#352164     - Post Rank:             
    In response to Femca

  • Quote:
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.

Code:

  Case Isemptyfield ) ; ""  <other stuff> )  



Vaughan Bromfield Sydney, Australia Please post questions to the Forum, not directly to me. Back-up your files before making changes! Whenever I hear the term "popular culture" I reach for my Iridium Q-36 Space Modulator.











Your continued generosity and support of FMForums is greatly appreciated.
LaRetta 
Developer
Posts: 7467
LaRetta

Post Rank (AVG):
            


FMP: 11 Advanced
OS: Cross Platform

Member: TechNet, FBA

 FMPug

Tweet This! Tweet This Post!
03-10-10 02:40 AM - Post#352167     - Post Rank:             
    In response to Femca

  • Femca Said:
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.












Icon Legend Permissions Topic Options
Print Topic

Email Topic

397 Views
Welcome Guest...
Enter your username and password to login. If you do not have a username you can register one here

Username

Password

Remember me. Help



Forgot Password...


Quick Links
Recent Posts
Active Topics
No Replies
Recent Files
Functions & Scripts
FileMaker Pro Help
FileMaker on Twitter
FileMaker Marketplace

Custom Search

Find FileMaker Developers

Don't have time to wait,
hire a developer now!

Recent Members
Welcome them to our community!
Find FileMaker Jobs

Want a new career?
Find your new job now!

Joy of Tech
Latest Joy of Tech!

Recent Topics
Recent Hot Topics
Contribute
With your generosity we can make some real magic happen!. Support your favorite online FileMaker community...
FM Forums.com


Click here...


Or a Donation of any amount.


Thanks for your support!

Active Blogs
0 Recent blogs:
People to Post Lately in this Topic
Femca
RodSierra
Vaughan
LaRetta
FM Forums Advertisers


FusionBB™ Version 3.0 FINAL | ©2003-2010 InteractivePHP, Inc.
Execution time: 0.425 seconds.   Total Queries: 72   Zlib Compression is on.
All times are . Current time is 09:03 AM
Content ©1996-2008 Ocean West Consulting, Inc. All Rights Reserved
Ocean West Consulting, Inc. can not and will not be held responsible for any of the contents in this site.
FM Forums™ is a trademark of Ocean West Consulting, Inc an independent entity, not affiliated with FileMaker Inc.
FileMaker® is a registered trademark of FileMaker Inc.
Top