Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Field Calculation Problem. Should be easy, help.


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

Recommended Posts

Posted

OK, I have this simple layout with a dollar amount at the top of the page. Say a paycheck amount... I want that paycheck amount to be cut into 6 different percentages. These percentages come from another layout with a name field... and a percentage field.

I hear there are still lots of bugs with FMP7 but haven't run into any and I'm wondering if this is a bug or if I have it wrong. Below is the basic calculation for the percentage:

If ( account_Name = "FFA" ; entry_Amount * account_Percentage )

account_Name = "FFA" is the account name field should be filled with "FFA", the coinsiding field with that record is account_Percentage... the value of "account_Percentage" should be the percentage that the entry_Amount is multiplied by (the amount is a decimal point ".1" which = 10%)

I've tried having the account_Name and account_Percentage link from a layout on the same database and I've had it linked from another related database.

The results I'm getting are blank boxes. Just a few min. ago, I switched to the variables layout and back to the entry layout and I had one box actually do the calculation successfully. Then I tried copying the equation to all the other fields and then the original field (which I didn't touch) went blank again.

Please help!

Posted

I am having trouble following what you are trying to do. It looks like you have made something simple into something so complex that it doesn't work.

How is FMP supposed to know what account_Percentage to use in your calculation? Why not a field FFA_Percentage?

Posted

That is the problem. It should be really simple but it's not working for me.

I've tried a layout with all the percentages as a fields... like you said "FFA_Percentage"

However, that didn't work.

I can make this thing work really easy by having the calculation calculate a specific percentage as part of a set equation, but I'm trying to make it calculate based on a field's content. How I identify which record holds the percentage data I need is by having a field named "account_name" then the coinsiding field from that record is "account_percentage". Now how can I TELL filemaker to use the "account_percentage" associated with the record that has the "account_name" = "FFA"?

If this doesn't make sense I can send you a copy of the database (emty and small) so you can take a look at it.

Thanks for any effort anyone puts into this.

Posted

OK, simplify the problem as much as I can... this is what I'm trying to do:

Ok, My problem is this...

I have 1 layout with data I need to use in a 2nd layout.

The field I need to get data from is the "account_percentage" field on layout #2. How I define which "account_percentage" field to use is by it's coinsiding "account_name" field.

On layout #1 I have a field that has a dollar amount that needs to be split by a percentage.

So, the display field from layout #1 is called "FFA". This field is determined by a calculation.

I need to have the "FFA" field from layout #1 look for "FFA" typed into the "account_name" field on layout #2. When it finds the "FFA" in the "account_name" field, I need to grab the data that is held in the "account_percentage" field from that SAME record.

Then multiply the data from the dollar amount to be split from layout #1 by the data held in the "account_percentage" field on layout #2 that is from the record with "FFA" in the "account_name" field on layout #2.

Posted

Your calculations have no need to be unstored. Deselect the 'Do not store calculation results' option in Storage Options for each of them. You might get better results using Case instead of If, because If expects a false result, which you haven't supplied.

I'm kind of surprised that 7 will let you enter an If statement like this. I think it's a bug.

Posted

Ahhh... Thank you SOOO much! That taught me some stuff. My dad is who got me into filemaker and he couldn't think of how to do this, I'll have to show him.

Thanks again. smile.gif

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