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

Howto? Show top 10 in portal

Featured Replies

Hello,

Here's the situation (fmp6).

3 tables: [color:blue]orders,products and product_lines.

In product_lines I have a field [color:blue]number (=nr of products sold)

Products has a calculated field [color:blue]nr_sold which sums the field [color:blue]number in product_lines

where

id_product=foreign key product in product_lines.

In the table [color:blue]orders I need a portal which will show me the top-10 of sold products. Tried showing the products with [color:blue]nr_sold in descending order but the portal shows all records of products (of course) and takes to much time to load.

I know this would be an easy one in fmp7 (or 8) but how do I solve this with fmp6.

Have never been a math brain and I'd like to avoid scripts that go to products, then sort and then number the top 10. Cause I think that might take as much time as showing all the products in the portal and the layout where the portal is on in [color:blue]orders is a main layout on which is worked constantly. With a script as mentioned above you'd have to wait for the script to run each time you add a product.

On the orders layout I need 3 of these portals (one by product kind, one by category and one by price) that have to show records at the same time all based on the top-10 (or maybe 20, still have to decide) sold products.

So while inputting orders you can also choose products from these portals.

Is there a calculation I can use that will number my top-10 sold records in products automatically? Or is there a better way?

Thank you for reading and eventually answering this question.

  • Newbies

:smile2:

May I suggest a simplification to Yr problem

Instead of going into complicated calculations why not limit Your portals to display 10 (or 20) lines and sort them so as to display the relevant data.

Remark ;) setting @@ on the portal line will number the portal lines sequentially and therefore indicate the 'rank'

  • Author

Thank you Former Dwarf

Sometimes one loses sight of the simple things :smirk: .

I'm so used to putting a scroll bar on portals that I didn't consider this simple solution.

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.