User Preference

Hello,

i have created a clothing app which asks the user to fill in preferences (Size, Color, Prize) when logging in and based on that input I want to show the products that best match those user preferences. I have a long list of products which each include each of those parameters (Size, Color, Prize).

My question is: How do I link the user preferences to the long list of products which will allow the user to only see relevant products? I have multiple users with difference preferences and it needs to work for each individual user.

Hope it makes sense

Thanks

Rasmus

1 Like

I don’t know if this relation will return the correct way we want it to, but have a try.

  • Add your preferences as 3 consecutive columns in your sheet name “Preference 1”, “Preference 2”, “Preference 3” so they will be showed as an array column in your Glide data.

  • In your products do the same thing as well.

  • Use a relation to match the “Preference” array in your profiles sheet to the “Preference” array in the products sheet and return multiple matches.

Please try if it works and tell me.

@Rasmus_Jensen So I am not sure if the above will work, as it may, but I have managed to create exactly what you described above using user specific columns for each users preference type (I used size, colour and cost) in conjunction with an if/else column which determines if each product matches the 3 above selections.

Then a list is simply used to display all products using the result of the True/false column as a filter.

More specifically my setup is as follows:

On your standard Users tab:

  • In Glide Only: 3 user specific preference columns (or more, 1 for each preference users can specify)

On your product tab:

  • In Sheets: Product name in column 1, description column 2 etc…
  • In Sheets: Preference columns matching those in the users tab filled in for their product
  • In Glide Only: If/Else column (this column will also be inherently user specific as it is based off of user specific columns
    • Create an If for each preference column
      • IF (pref 1 in user sheet) IS NOT (pref 1 in product sheet) THEN False
      • IF (pref 2 in user sheet) IS NOT (pref 2 in product sheet) THEN False
      • IF (pref 3 in user sheet) IS NOT (pref 3 in product sheet) THEN False
      • …(add as many ifs as there are columns of preferences)
      • ELSE True

In the Glide Designer

  • Create a list page or inline list somewhere in your app and filter it using the if/else column.

Let me know if you have any questions!

2 Likes

Thats awesome! Looks like that will work. Thanks a million!

As I see it, this will work for a “perfect” match of preferences. But what I actually also want to be able to do is to sort on “near perfect” matches. So if the price of the product for example is very close to the user price preference I also would like to show and list those after how close the products get to the user preferences. If that makes sense?

Would you by any chance know who to solve this one also?

Thanks

Rasmus

Thats awesome! Looks like that will work. Thanks a million!

As I see it, this will work for a “perfect” match of preferences. But what I actually also want to be able to do is to sort on “near perfect” matches. So if the price of the product for example is very close to the user price preference I also would like to show and list those after how close the products get to the user preferences. If that makes sense?

Would you by any chance know who to solve this one also?

Thanks

Rasmus

Hi @Rasmus_Jensen,

Glad to know the above is almost what you’re looking for.

Changing to a range of price is pretty easy with the addition of 2 more columns.

Create 2 more columns in glide of type math. One is a LowBoundary and one is a HighBoundary, which for my example multiplies the users selected price by 0.8 and 1.2 respectively, giving 20% variance on either side (this of course can be any percentage you would like to put in depending how many results you want to return).

Then in your match column, instead of the last IF shown above enter the 2 following IFs instead:

  • IF (LowBoundary in user sheet) IS > (pref 3 in product sheet) THEN False
  • IF (HIghBoundary in user sheet) IS < (pref 3 in product sheet) THEN False

the result should only make it to the ELSE condition if the price of the items falls WITHIN the high and low bounds set per user.

If you want to also display (in another list somewhere) items that are close to their range, but either too high or too low, again using a couple math columns to set the range and a new Match column to evaluate would do the trick. Just have a wider range for the “almost in your price range” list.

Hope that all makes sense!

Thanks a lot (again!). I will test it out. Have a great day!

Rasmus

No Problem.

@Rasmus_Jensen please mark as solution if it works out!

Thank you.

@Rasmus_Jensen Did this workout for you?

Hello, it didnt quite workout the way i wanted it to, so I went a different direction instead. It now works. Thanks a lot for you input on this one.

Glad to hear it worked out, do you mind me asking what method you used? I’m always looking to learn different techniques!

1 Like

I am also looking to make multiple filters working with an inline list. Can you please describe what worked for you @Rasmus_Jensen ? This way you can give back to the community.

You can try this.

2 Likes