stolen_gtr Posted July 2, 2007 Posted July 2, 2007 hi all, i was wondering if there was a way to write a script to display the least sold products in my database. i have a field which calculates how many times each product has been sold, and currently i am doing a find to display products sold < 10 times. I know this is not a very good way of doing it because it doesn't show the 5 least sold, just ones sold under 10 times. I hope there is a script which will allow me to achieve this. thanks in advance, Lucas
comment Posted July 2, 2007 Posted July 2, 2007 How about: Show All Records Sort [ by quantity sold, ascending ] Go to Record 6 Omit Multiple Records [ Get ( FoundCount ) - 5 ] Could be made a little smarter by adding a loop in case there's a tie for 5th place.
Recommended Posts
This topic is 6354 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