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.

Field Calculation Problem. Should be easy, help.

Featured Replies

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!

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?

  • Author

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.

  • Author

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.

I am not sure, but you may be saying layout and mean table. Please post your files so we can look at it.

  • Author

OK, just look at the file I have. you can find it at www.claxbox.com/Entry.zip

I may be going about this the wrong way but it would be really helpful to get passed this issue and see what it is I'm not getting...

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.

I have looked at your file and have made 3 different methods in the attached file

Entryfolder.zip

  • Author

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

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.