Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Howto? Show top 10 in portal


This topic is 6966 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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
Posted

: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'

Posted

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.

This topic is 6966 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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