We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Re: How to store and filter more than 128 values in a list.single_line_text_field metafield?

How to store and filter more than 128 values in a list.single_line_text_field metafield?

kaznight
Shopify Partner
7 0 3

I'm working on a Shopify project that requires storing and filtering a large number of IDs (sometimes over 1500) for each product. These IDs represent compatible vehicle models for each product. Here's my current situation:

  1. I'm using 'list.single_line_text_field' metafields to store "model_ids" and "car_ids".
  2. I'm limited to 128 values per metafield, which is insufficient for my use case.
  3. I need to be able to filter products based on these IDs via URL, like this:

    .../all?filter.p.m.custom.model_ids=12345&filter.p.m.custom.car_ids=98765

Main issues:

  • The 128-value limit per metafield.
  • Tags have a limit of 250 values, also insufficient.

Questions:

  1. Is there a way to exceed this 128-value limit while maintaining URL filtering?
  2. What’s the best alternative for storing over 1500 IDs per product in Shopify while allowing efficient filtering?
  3. How can I adapt my filtering system to work with a solution that allows storing more than 1500 IDs?
Replies 2 (2)

kaznight
Shopify Partner
7 0 3

Hi everyone!

I still need assistance with this issue. Could anyone please help me 🙏 ?

thomastopuz
Shopify Partner
2 0 0

Did you find a way to achieve this?