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.

Record by record query?

Featured Replies

Hello,

I am trying to query through a table record by record to add up a certain field of the records that qualify under the if statement:

If ( qualification1 and qualification2 and qualification3; Sum ( add up certain field of all the records that made it through the if statement ) ; 0 )

However, the if statement goes through the first record only and, if it qualified, adds up all of the table's entries, regardless of whether they qualified individually.

Is there a foreach statement or something similar I can use?

Thanks.

Calulation field functions can only "see" data in their own record. They cannot see data in other records or the found set. (The GetSummary function is the only exception.)

Summary fields can see found sets. So you want to make a summary fiels that sums a calculation field.

  • Author

Thanks once again Vaughan. I don't think that a summary field will work, because there are multiple sorting criteria that would go into the field. More specifically, I am trying to keep a running sum of a field, should the underlying record have a qualifying content in three other fields. Should one of these three fields be different....B)

A B C D

1 1 2 10

1 1 3 13

1 2 2 5

2 1 3 9

2 2 1 14

2 1 3 10

Trying to summarize data in column D for each unique data in column A, if data in column B = 1, and for each unique data in column C:

A C Summary

1 2 10

1 3 13

2 3 19

I have the sorting mechanism for columns A & C, but Summary is non-exclusive, so I get:

A C Summary

1 2 61

1 3 61

2 3 61 (Sum of all of column D, since the 1 record meets the criteria. E.g. it simply sums everything if the first record qualifies)

Is there anything more specific I can do?

You can create subsummary part when sorting by A&C and in preview mod get what you want.

  • Author

Thanks for your responses. I think that I will go the self-join / relational route to maintain live data.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.