How to search for data that has a list that overlaps with the list specified in the condition.

Answered

Hello community!

I've tried everything, but I just can't seem to solve the problem and I need your help.

I am developing a database of information on domestic companies.

In addition to company name, location, and date of establishment, the database will include information such as number of employees, average annual revenue, and type of industry.

Users can specify various criteria and search for company data. For example, a company in Tokyo with more than 100 employees, and so on.

What we are unable to implement this time is a search that specifies the type of industry.

A company may have one industry or multiple industries. Some companies have only one business, like small and medium-sized companies, while others have a variety of businesses, like large companies.

On Xano, company information is stored in Company_info and industry is stored in Child_industry.

When we look at a company's data, we can see that the ID of the industry is linked to the company's data in the "Table reference". See the image for details.

The search criteria from the user is received as a list of industry IDs. See image.

Therefore, the search API sets the conditions shown in the image below in the "Query All Records" field. The search is performed to see if the list of industry IDs specified by the user overlaps with the list of industries owned by the company data.

The setting seems right. However, when this is executed, an error occurs as shown in the image below.

I need your help. Please help me. Thanks.

2 replies