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.

Lookup Function Help Needed

Featured Replies

I have a portal with two fields: Years & Date

I would like a function that would return the longest time in years along with the date associated with it.

Example:

PORTAL:

(Years) (Date)

2 1-5-05

4 5-6-05

Would like 4 & 5-6-05 Returned on the main page.

Help please

Joseph

  • Author

Let me explan a little more on this:

I have a main Table with some calculation on it -- on this main table I have a portal that I type in two fields "Years" & "Date".

What I would Like to do is to beable to pull off to the main table from the portal the longest time in "years" along with the "date" associated with it.

Notes: There can be many entries into this portal. I need it to look down the full list.

Joseph

How are your two tables currently related?

  • Author

Yes,

ID -- Rel_ID

?

Joseph

What do those relation fields signify? Can you tell us a little bit more about your database, maybe post an attachment? I'm having a hard time wrapping my mind around your current setup.

In Edit Relationship, make your relationship sort by Years, descending (in the portal setup, select another sort, if you like).

In the main table layout, put the Years and the Date fields from the related table on the layout - anywhere outside the portal. These will show the data from the related record that has the maximum value in Years.

Max ( RelatedTable::Years_Date ) where Years_Date = Years & " " & Date in the Related Table.

  • Author

Let me see if I can explan.

Main Table:

RecordID

First Name:

Last Name:

Address:

Also a Portal: Named "LE"

This portal is as you know another table "LE"

LE Table:

RecordID

Rel_RecordID

LE_Years

LE_Date

Relationships: RecordID -- Rel_RecordID

So what happens is that I full in a a new record with Name, address etc... Then what I do is I can type into the portal with very spefic reports -- like LE_Years and the date it came in. There can be many lines in this portal.

What I wanted to do is to be able to pull out the largest LE_Year in the Portal that is just a max function I know how to do this... This is the hard part... I want to pull out along with the LE_Year number the date that it was enterd -- LE_Date.

Joseph

Max ( RelatedTable::Years_Date ) where Years_Date = Years & " " & Date in the Related Table.

IMHO, that's not going to work.

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.