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

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

Recommended Posts

  • Newbies
Posted

I have a data base that contain similar to the one below:

Col-1 Col-2

2 2

5 3 (from col-1 (5-2))

10 5 (10-5)

11 1 (11-10

Value on Col-2 is by subtrating Portal Line 2 from Line 3. Problem, I need help to do it.

Posted

Hi Tsong,

You could setup a relation in your main file to get the Col-1 value from the previous record.

You could do this by defining a serialnumber field that automatically gets a serialnumber when a new record is created.

Then you could make a calculated field that has a value of (serialnumber -1)

Finally set up a relation from the calculated field to serialnumber.

Then Col-2 could be defined as calculation:

Col-2 = Col-1 - Relation(Col-1)

But undoubtedly there are 10 other ways to achieve this...

Regards,

Ernst.

  • Newbies
Posted

Thanks Ernst for your reply. Just a clarification, I am only referring to one record and the calculation will be through the portal where the repeating fields of this record. I don't know how to apply the serial no. into one record with several field. I hope my question make sense (pardon my english).

Posted

Hi Tsong,

So -if I understand correct- your fields are called Col-1 and Col-2, and they are both repeating? And all the numbers in your first example are in one record?

Then the serial number bit is indeed not the answer.

Maybe you can post a (simplified) example of your database for clarification.

Regards,

Ernst.

Posted

Hi Tsong,

I looked at your sample, and think Anatoli is right, you should not attempt to do this with repeating fields.

Each line in your sample should be a record in your filemaker database and

the kind of total you need is a running total.

I made a small example that's attached.

Regards,

Ernst.

Tsong.fp5.zip

  • Newbies
Posted

Thanks for your time Ernst. I will follow your advice to use record per line and your sample file to use running total (per line). My other problem is the DPWF which is the reverse of the running total (instead of per line addition it is now per line subtraction) which is very hard for me. Again thanks for the help/advice that you can give me.

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