There is a User Table (Table 1) and one user has multiple clothing pieces in their record.
There is an Outfits Table (Table 2) that has multiple records (outfits), each record containing multiple clothing pieces from Clothing Pieces Table (Table 3).
I need an image list to contain all records (outfits) from the Outfits Table (Table 2) that contains all clothing pieces from the users record (the clothing pieces the user has).
For example:
A single user has the following clothing pieces:
a blue shirt
khaki pants
brown shoes
black shoes
There are two records (outfits) in the Outfits Table:
Outfit 1:
a black shirt
grey shorts
black shoes
Outfit 2:
a blue shirt
khaki pants
brown shoes
I need the image list to display Record 2(Outfit 2).
Can anyone help me with this? If this doesn’t make sense, I can try and explain even more. Thank you!
You have a Outfits Table and a Clothing Pieces table and they are connected as Many to Many. ( A Outfit can have many clothing pieces and a clothing piece can have many outfits )
And then a user can have many clothing pieces and a clothing piece can have many users.
And you have a list that it needs to be filtered by the User’s clothing pieces.
Like if User A selected Blue Shirt and Black Shoes and then Outfit 1 has Grey shorts and Brown shoes and Outfit 2 has Blue Shirt and Khaki Pants then the Outfit 2 to has to display in the list.
Correct?
I made a quick app to see if I understood this correctly!
Hi Dilon. First, thank you so much for responding. I really appreciate it.
For the app, not quite, but almost. If User A selects Blue Shirt and Black Shoes, I wouldn’t want any outfit to be displayed. Unless there is an outfit in the database that has exactly and only Blue Shirt and Black Shoes.
Correct. I want it to resemble a users closet. If they look in their closet and they see a “blue shirt”, “khaki pants”, and “brown shoes” and that is an outfit in the the Outfit database I want that outfit to display. If there is not an outfit in the Outfit database that contains those clothing items then I do not want anything to display.
Also pieces have multiple outfits and outfits contain multiple pieces.
Ok got it, just one thing that does not add up yet. you refer as 2 tables, usually this would mean 3 collections, but then outfit 1 and 2 as 2 records.
I assume you have 1 collection (clothing) and another collection Outfit (where contains outfit 1 and outfit 2).
User Story 1
Collection 1 (clothing): has individual items of clothing - This collections has all items for user to choose freely.
Collection 3 (user): the user can add items of clothing to his/her record (think of this like their closet). This is where the relationship is created. When user chooses a clothing from Collection 1 this is added to the user, this is independent from the Outfit collections.
Later on, when user wants to combine some clothing of his collection, when it chooses a couple of items, you want to show if there is a match or not from the outfit collections?
Or
User Story 2
When users are actually adding items to their records from the “clothing”, this is the moment where you actually want to show that there is or not a match on the Outfit records?
User Story 1
Collection 1 (clothing): has individual items of clothing - This collections has all items for user to choose freely.
Collection 3 (user): the user can add items of clothing to his/her record (think of this like their closet). This is where the relationship is created. When user chooses a clothing from Collection 1 this is added to the user, this is independent from the Outfit collections.
Later on, when user visits a separate page they will see all the outfits that they have in their closet that is based off of all the items of clothing in their record (these outfits are connected to the items automatically upon adding items to their record).
Does anyone have any suggestions of where or who to ask for help to solve this problem? Even a similar problem already solved in the forum would be helpful.