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

store value from privious record in current record

Featured Replies

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

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

  • Author

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

Enclosed is a simple example. When you create a new record for an existing ID, it auto enters the end date from the latest record.

AutoEnterExample.fp5.zip

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

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.

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.

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

That should work. Wouldn't it preclude any auto updates?

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.