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.

Counters and Resets

Featured Replies

Hello,

I've run up against a snag. I'm working on a database that monitors experiments done in the lab. We run gels with lanes in them and I'm trying to create a counter that automatically enters the lane numbers.

There are 2 tables in the database (gel info, samples). The first is general information about the gel (date, employee,...) and a gel#. This gel# is what links the two tables. The second table has the gel# and then lane# and sample name.

So when someone enters a new gel record there is a portal on the layout for the "sample" table. I want the lane# field to start with 1 when a new record is created. Then on the next line of the portal, ie sample 2, the lane# increases to 2, next record lane# = 3, etc... as records are added to the samples table through the portal.

I can do that with the serialization but I run into a snag when I create a new gel record. I want the counter to start over at 1 again instead of + 1 from the last lane number assigned.

Do I need a field to perform a calculation and have the lane# access this field.

Any advice would help tons.

Thanks

js22

You should be able to use a selfjoin on the samples table GelNum field. To create the selfjoin, add a second occurrence of the Samples table on your Relationship Graph (I'll call it HiLane) and drag a relationship between the GelNum fields in each. Then set the LaneNum field to autoenter the following:

Max(HiLane::LaneNum) + 1

I think that should do it...

  • Author

Thanks for you help,

I did what you suggested and it seems to work for the first sample. The problem that I'm running into is that it is not recalculating the max(Hi Lane: Lane#).

So if you go to the record it will say what is the highest. So if 2 is the highest as you continue to enter sample names all of the lanes come up as 3.

I've added a template so you can see what I mean. But it is a step in the right direction.

Thanks,

js22

Lane_Numbers.fp7.zip

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.