# Create relation on partial text match

**URL:** <https://community.glideapps.com/t/create-relation-on-partial-text-match/80638>\
**Category:** Ask for Help\
**Created:** [March 11, 2025, 3:13pm UTC](https://community.glideapps.com/t/create-relation-on-partial-text-match/80638 "2025-03-11T15:13:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swellart](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/swellart/32/6118_2.png) [@Swellart](https://community.glideapps.com/u/Swellart)\
**Post date:** [March 11, 2025, 3:13pm UTC](https://community.glideapps.com/t/create-relation-on-partial-text-match/80638/1 "2025-03-11T15:13:10Z")

</div>

Hello everyone!  
I want to establish relationships between columns by partially matching text.  
Example: I have a master product catalog with names, codes and descriptions for each product.  
And I have invoices and labels for these products coming from different dealers. Dealers use names and codes slightly modified. For example, instead of code 0000125-030 it can be code 00125.30 or B00125-30. Same with names.  
I want to use Image to Text or Document to Text to read the Invoices and labels of the products coming from dealers and then establish relationships with the master catalog to have descriptions and photos related to this new product.  
What do you think is the best approach for this?  
All comments are highly appreciated.

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [March 11, 2025, 3:22pm UTC](https://community.glideapps.com/t/create-relation-on-partial-text-match/80638/2 "2025-03-11T15:22:56Z")

</div>

I would use query column to use conditions like “includes”.

You can also use template column or JavaScript column to make your formatted codes.

---

<div class="post-metadata">

**Author:** ![Swellart](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/swellart/32/6118_2.png) [@Swellart](https://community.glideapps.com/u/Swellart)\
**Post date:** [March 11, 2025, 5:34pm UTC](https://community.glideapps.com/t/create-relation-on-partial-text-match/80638/3 "2025-03-11T17:34:14Z")

</div>

Thank you for coming out. The query column is not a solution, and I don’t see how to use the template or a JavaScript columns yet. Real example: main catalog - Title: Orange Opalescent, Double-rolled, 3 mm. Code: 000125-0030-F. From Image to Text I have a string: 3 mm Orange Opal Striker 0125.30 (already striped from other information on the label)  
The label structure varied from dealer to dealer and from one product category to another.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [March 12, 2025, 12:36am UTC](https://community.glideapps.com/t/create-relation-on-partial-text-match/80638/4 "2025-03-12T00:36:07Z")

</div>

If it varies from dealer to dealer, would it make sense to store a separate code for each dealer, for the same product? I think for something like this, having a partial match is quite risky.

---

<div class="post-metadata">

**Author:** ![Swellart](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/swellart/32/6118_2.png) [@Swellart](https://community.glideapps.com/u/Swellart)\
**Post date:** [March 12, 2025, 6:01am UTC](https://community.glideapps.com/t/create-relation-on-partial-text-match/80638/5 "2025-03-12T06:01:35Z")

</div>

Thanks ThinhDinh for coming out! I’ve been thinking about this possibility too. I was just hoping some “AI magic” might be a more elegant solution. )
