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.

Portal to display First 100 records - Sort by Date

Featured Replies

How do i?

Portal to display First 100 records - Sorted by Date Desc,

So i can get the latest records from the database.

Currently I create a layout that will pull all the records, takes a long time.

Thanks Thanks....

"Portal to display first 100 records so I can get at the latest records from the database".

You want the first 100 but want to get at the latest date? The first 100 records in the database will probably be the oldest dates instead, right? crazy.gif

I would suggest instead using globals to filter your portal. In vs. 7, we can join on more than one field; multi predicate. You would use greater-than and less-than with date globals (gFrom and gTo) joined to your one date - to display date ranges as you wish in the portal or use Custom Function Date Range or SmartRanges. Or you can use unstored date calculations, ie, Get(CurrentDate) - 90 and Get(CurrentDate).

Then sort the relationship on your related date field or sort the portal itself. wink.gif

MoonShadow: I think you're misreading Ivan's post. He wants to display the latest records, not the "first," but only 100 of them. One method would be to get the last record ID of the related table and then subtract 99 from that and set up a non-equijoin relationship with that range of records.

"record ID of the related table and then subtract 99"

Hmmm, RecordIDs do not run in sequence by 1; in fact, they jump by large (and irregularly numbered) amounts. Your idea might only produce 3 records - or none. No, I didn't misunderstand him. If he has a serial, he could use that also. My point was that he asked for the 'first 100' when actually he wants the 'last 100.' No? wink.gif

Apparently. The related records would be sorted by date in descending order; so it's a matter of picking off 100 of them.

  • Author

How does one create a Non-equijoin relationship?

How does one do a filter? Portal display the occurances of keyfield.

I have also tried the limit records using permissions it supports boolean only?

Thanks for help. I am new to Portal .

I think you would have to set a global with the 101st related record id (if it exists) and use a relationship of global > related::id. You would need a script like

If [Count(yourrelationship::id) > 100]

Go to Related Records [show, yourrelationship]

Sort [ by date descending ]

Go to Record/Request/Page [101]

Set Field [originaltable::globalnumberfield; id]

Commit Records/Requests

Go to Layout [original]

End If

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.