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.

How do you show most recent records in portal (?)

Featured Replies

Hello,

I have a database that handles a slew of "running totals" (for argument's sake, call it 'calories consumed').

Let's assume, in this database I have 8 people listed, and I have all their calories for each meal during a week (21 in total).

If I want to have a portal that shows each of the 8 people, with the total calories consumed (i.e., the total from the most recent record), *sorted* in descending order of total calories - how would I be able to do that? When I set up a typical portal, it seems to pull the data from the first record in the database; not the most recent (which contains the information I need).

I'm using FM 5.5 -- it seems like there SHOULD be a way to accomplish this, but I'm drawing a blank!

Chris

Sort the portal using the Calories field. :

In your version you need to sort the relationship the portal is based on. It's under File>Define Relationships.

Michael

  • Author

Hi Michael,

I now know why it's not working, but I've no idea how to fix it. Let me go into more detail (and step away from the easier-to-understand "calorie" scenario, and discuss what it's really doing).

The database tracks scores in various games played. Each game has it's own id#, and then, each person has his own id# (and name). So, to see game1 / Bob, the id/name field would be 1Bob.

In addition, for the FIRST time someone has played a game, there's an X-Field (which denotes their first playing). So, someone playing game 1 for the first time would have X1 with their record. Someone playing game 2 for the first time would have X2, but someone who had played previously, would just have "2."

I did this because I wanted to isolate records to be pulled into the portal. Since the fields I want to display are all calculation/sum fields, it didn't matter which record was selected, and it was easiest to identify the 'first,' (otherwise, I'd get *all* records, which I didn't want - I wanted each person represented once in the portal).

The relationship I've set up is on the X/game id relation (so, in the file with the portal, there're different records which pull related records X1, X2, X3, X4, X5, etc. The relationship is the X/game id in the portal file to the X/game id in the related file, and then, it's sorted, descending, by the score.

The problem with that, is it's ONLY looking at the Xgameid, and only if there's an X - so, it's restricted to the first time people have played (which explains why my new scores are only being shown from the first record someone has).

If I change it to JUST GameID::GameID, I can sort it by sequence, descending, but, then, it displays ONLY from the last record (and not from each person), for some reason.

What I need, I think, is to figure out a way to denote the most *recent* record in the main file (maybe a reverse gameid/xfield) and then, relate on that field to the portal. Otherwise, I don't know how to get the information I'm looking to display to show up.

Chris

Edited by Guest

  • Author

I was able to solve this problem.

As I mentioned, I needed to denote the most *recent* record in the file. Once I did that, and changed the relationship to search by that field, instead, I was able to get the proper information to show up.

Thanks to all who helped!

Chris

  • 1 month later...
  • Newbies

I am having a similar problem with pulling the most recent record.

Your logic makes sense to me, but I cannot seem to denote the most recent record. How did you do that?

  • Newbies

I figured it out. I created an identification number to denote the most current comment by. Then defined the relationship within the specify section.

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.