Filtering keywords on advanced

I have a 2 databases - orders and customers. Order has a customer.
I have a flow that OCRs and interprets through the AI an order and extracts things that look like company names.

I save them on the order.

I would like to filter a repeating group of companies (based on do a search for company) to suggest which company this order may belong to - but to do this I would need an action of filtering AI Company Extract for keywords matching the company names from the database.

But… on filtering option I do not see the way to look for key words (company name) in the following string.
I can do it only the other way round so the company name can be searched for containing key words and it’s not the same as my AI company list contains many company names but none of my companies has all it’s names in one field.

image

Any ideas?

Hey your question is little confusing. You said there are 2 datatypes: Order & Customer.

How are you doing A SEARCH FOR a COMPANY? Is company a Datatype or a Field in Order? If you share more details I might be able to help you.

All right. Let me try to rephrase it.

I got a Cusomter and Order.
I save on an Order an OCR and AI Recognized list of potential customer company names it may have identified from the order.
I want to display to the user a repeating group where the customer are filtered that their name matches any of the words from Order AI Recognized customer text field.

This should explain it better.
Customer and company is the same thing - just call it differently.

Alright in this case you should use :filtered operator.

Do a search for Customer: filtered > Company name intersects with the List of OCR list items.

WARNING - I’m still confused about your DB structure so the specific example might not be right. Hopefully you get the idea of using :filtered and intersects with to achieve your goal.

While implementing this consider the optimization path. You may want to leave RG empty until user needs to see the list. If you set the value by default, user won’t see it but Do a Search for might still execute against an empty list every-time page is loaded. This needs to be tested.

Probably I have too many mental abbreviations to be clear, so pardon me here.

An Order has a Customer.
Customer has a name (text)
I OCR a document to create an Order, and fill it’s fields accordingly. I also save one more field with list of texts where I have potential customer names.

I want to do a search for Customer in a Repeating group - where customer name contains any of the found by the AI texts. So If AI read companies Auchan, Leroy Merlin, Volvo, Mercedes and one of the Customer in our database is Mercedes, I want to see this in search.
The reason to do it is to sort of building custom searchbox dropdown to pick from.

The whole reason to build this

  1. I cannot impact searchbox typed text(and I cannot use inputs - as I need the user to pick a specific company from the list)
  2. AI sometimes reads more companies than just the company issuing the order (as order can be done for another company which is the customer of my customer - ex. Food Delivery company doing job for a restaurant, but still our customer is Food Delivery, not the restaurant mentioned in the document).