michele Posted November 1, 2005 Posted November 1, 2005 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 former dwarf Posted November 1, 2005 Newbies Posted November 1, 2005 :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'
michele Posted November 1, 2005 Author Posted November 1, 2005 Thank you Former Dwarf Sometimes one loses sight of the simple things . I'm so used to putting a scroll bar on portals that I didn't consider this simple solution.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now