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.
Juggernaut

Featured Replies

hi again. need help.

i have a database with 2 tables. they are related with a field called year. on table1 i have a field with number values. the least/minimum value is 1500. what i want to do is to create in table 2 a field that will contain the sum of data with 1500 on field 1. thank you. :)

It is not quite clear exactly what you want but the following may help

1/ In Table 2 Establish a relationship between a global field and field 1 (remember to use a global field of the same type as field 1)

2/ Enter 1500 into the global field

3/ Create a calc field (result number) using one of the following

a/ Sum(newrelationship::anynumberfield) will give you the sum total of the data in any number field for the records that have 1500 in field1

4/ Count(newrelationship::anyfield) will give you the number of records that have an entry in any field where the record has 1500 in field 1

HTH

Phil

  • Author

thanks for the reply. anyway it did not work. maybe I was not so clear. the field in table 1 which contains 1500 is a result of a calculation.

when i put a relationship on field with 1500 in table 1 and the global number field in table 2 i lose the year relationship! so i created a new table relationship

i tried the calculation you wrote. the SUM gave me the total of the field with 1500 and the COUNT gave me the total number of entries in that field.

i will try to explain more:

in table1 i have a calculated number field with 1500 as the minimum result value. sometime it will happen that i get 4,5,6 etc. entries with 1500 on them. the others may be more. now what i want to count and put into a new field on table 2 are the sum of entries with 1500. For example if there are 5 with 1500 the field on table to must give me 7500 if 4, 6000 etc. i hope i am clearer now. thanks.

It would be much easier if you used real names for the tables and fields - we are not computers here, you know. I can't even explain what I mean with names like that, so I'll restate your problem like this:

Table Data:

- Yearfield

- Numberfield

Table Viewer:

- Yearfield

Now, it seems you need a calculation field cMin in the Viewer table =

Min ( Data::Numberfield )

Next, set up a relationship between Viewer and a new occurence of Data:

Viewer::Yearfield = Data 2::Yearfield

AND

Viewer::cMin = Data 2::Numberfield

Finally, a calculation field in Viewer =

Sum ( Data 2::Numberfield )

will give you the sum of entries that are at minimum value for that year.

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.