Not finding the condition I should use

Hello and thank you for taking your time to help me.
I need help with the creation of my character’s inventory in my game. I want to make an inventory with boxes (Minecraft type). I have created the following code (picture 1) but I don’t know what condition to put in it so
that the code knows in which box to put the item and in which box not to put it (because it is filled) (picture 2).
It’s the For Each Loop that I have a problem with.(I have already tried to set a boolean condition representing the occupation in the given box but because of the For Each Loop and the Clear Childrens function (picture 3) it locks the boxes one by one and simply moves the items to the end of my inventory so that I can’t add any more items without anything appearing there.) So I am at this stage, I don’t know what condition to put for my inventory to work. Just in case you don’t understand the name of the items I created:
Case = Box (of my inventory) from 1 to 15.
Bag = The widget blueprint of my Inventory.
Item = The widget of the items to put in the boxes of my inventory.
In any case, thank you in advance for the help you will give me, whether it is minimal or completely solves my problem.

That was it ! I didn’t know this function existed. Thank you very much.

I’m not sure if I understand correctly. Do you want to check a Vertical box if it is empty? If so, place the item you want in it as a child? If not, skip that one and check the next Vertical box? You can use “Has any children” node to check if a Panel(e.g. a Vertical box) is empty or not.