Avatar of Alex Campbell
Alex Campbell
Flag for United States of America asked on

How to Replace field with results of calculation

I need to update a field with the results of a calculation every time I enter a record.

The destination field cannot be a calculated field because FMP does not allow indexes on calculated fields.

The destination field must be indexed because it is used for a portal.

Example:

Original entry $234.37 into Amount Paid.
Calculation Results will be 2 into Amount Category field since the amount is between $200 and $299.  

The portal will show all payment processing rules for a payment in that amount range.
FileMaker Pro

Avatar of undefined
Last Comment
ErikCayre

8/22/2022 - Mon
Will Loving

Actually, FMP does allow indexing on a calculation field as long as the fields referenced in the calculation are themselves indexed and in the local table. Check to see that your Amount Paid field is indexed. You should then be able to use an Auto-Enter calculation on the Amount Category field. You could also create a relationship from the Amount Paid field to the Rules table using to predicates and greater than and less than operators.

For each rule define a minimum amount and a maximum amount that that rule applies to, then create the relationship such that:

Amount Paid >= Minimum Amount
Amount Paid <= Maximum Amount
ASKER CERTIFIED SOLUTION
ErikCayre

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck