Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hi

What I want to do:

Database for keeping track of electricity use. So take start reading take end reading en use the outcome of end reading - start reading.

The following day I create a new record and the start reading is the end reading from the previous day.

But

I do not seem to get it working! I can use the option value from previous record but that is the same field and not the value of the end reading field from the previous record.

can someone give me a direction to find a sollution for this?

thanks!

emma

Posted

Here's one solution:

Assuming you have a CustomerID field in there (to distingush between different customer's readings,) create a self join relationship:

ReadingSelfJoin=

Reading::CustomerID = Reading::CustomerID

sort the relationship by StartReadingDate, decending.

Now make the StartReadingDate a lookup = ReadingSelfJoin::EndReadingDate

Posted

First at all thanks!

But it is not working for me. Adding a second record works great but as soon I start the third record it takes the value of record confused.gif

is it possible that you make a small setup or have a look at my file?

thanks a lot!

emma

Posted

I am attaching a file originated by John Mark Osborne and modified by me. John Mark & exchanged e-mails about which was correct. Neither of us concided. You can download the original from his site.

LULAST.FP5.zip

Posted

Hey Ralph,

I can see how your solution works when the file has only one customer's records, but I think it would need some modification to work for multiple customers (though it is not clear if emma needs it to work for multiple customers.) I would also be concerned about the possibility of an entry being made out of order.

Posted

The problem I see with you method is re-lookups. If you need to make a change the re-lookup would put the same value in all the records for a customer.

Posted

Good point. Then how about using the same self-join, but use an auto-entered calc instead of the Lookup:

Start Date (date, auto-enter calc) = SelfJoin::EndDate

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