Aug 04, 2020 06:49 AM
Hello,
I would like to have only one product from each category.
There are two lit in stock but I want only the first one in the grid
Thx for helping
Aug 04, 2020 07:59 AM
I don’t quite understand what you’re trying to achieve. Could you go into greater detail about the setup of your base, and what you wish to accomplish?
Aug 04, 2020 08:15 AM
Yes,
This is the complete list and I would like a list of products, in stock, by Type (I know how to do it) and only one product by category.
I have 2 products in the category lit. I would like to filter the second product if the first product are in stock, the right type.
I hope I am clearer
So If I want a lit from chambre, the result will be Lit A
Aug 04, 2020 08:28 AM
If I understand you correctly, you only want to see the first in-stock item in each given category. In your example, you only used two, but let’s say you’ve got 10, and items 1 through 4 are out of stock. In that situation, item 5 is the first in-stock item, so you only want to see Item 5, and hide 6-10. If Item 5 gets used and goes out of stock, then Item 6 should be shown as the next available item, and 7-10 should remain hidden. Is that correct?
Aug 04, 2020 08:31 AM
Yes it’s exatly that ! :grinning_face_with_big_eyes:
Aug 04, 2020 08:46 AM
I have an idea of how to pull this off, but I don’t fully understand the purpose of the table in your screenshot. You have a [Products]
table where each product is listed, and another table where you’re tracking the stock status of each product. What’s the purpose of the table you’re displaying? It seems to me that you can get the result you want directly on the [Products]
table. Also, why is the stock status kept on a different table than the products themselves?
I think there may be a way to clean up your base design while also giving you this filtered view that you want, but it would help to know more about all of your tables and have a clearer picture of what data you’re storing and what you wish to do with it.
Aug 04, 2020 08:53 AM
I unterstand why you don’t understand the purpose.
I use “in stock” if the product is available from my providers
I am working with intergromat et woocommerce to import product but intergromat doesn’t handle plugins so I cannot import bundle products via intergromat (i have to use CSV).
I created a excel files to generate the csv but I need the list of the SKU of each product from bundles products.
Aug 04, 2020 10:05 AM
Thanks for the clarification. I still don’t understand everything you’re trying to do, but for now let’s focus on this individual task. Here’s how I set up my test. I used a checkbox field to represent your status lookup field, but it should still work the same. I also added a lot more examples just to make sure the process works with large quantities. I named this table [Main]
for this test:
Over on the [Products]
table, I first added two lookup fields, both using the links from the [Main]
table. One looks up the stock status, the other looks up the {Product Position}
value.
Jumping over to the [Categories]
table, I added a rollup field named {Smallest In Stock}
:
That gave me the position number of the smallest item that’s in stock:
Back in the [Products]
table, I added a similarly-named rollup field to pull in that value, and compare it against each item’s position value. This will return a 1 where that product matches the lowest number, and a 0 for any product that doesn’t match.
Returning to the [Main]
table, we can lookup that value, and use it in a view filter to control which item is displayed in each category.
I’ll leave the filter off, but you can see that if you applied a filter to only show records where {Display Filter}
contains a 1, it will only show the first item.
If several items are out of stock, only the next one in line will display.
If I have multiple items in different categories, each category will show its lowest available item.
Aug 04, 2020 10:19 AM
It’s totaly what I need. I’ll try it tomorrow.
Thx for your help and I’ll tell you the status of it tomorow
Aug 06, 2020 01:29 AM
It’s perfect ! It’s what I need. Thx man