How can I make it so that when I select country in dropdown in repeating group it will find the company whose countries match in dropdown country

I have a repeating group with companies and in them there is a field country type text. There is also a dropdown from option set country which is not bound to the company entity. How can I make it so that when I select country in dropdown in repeating group it will find the company whose countries match in dropdown country.

Firstly, I wouldn’t use type ‘Text’ for the Country field on the Country datatype if you have an Option Set.

Use the Option Set instead.

Then, in your Company RG datasource, just add a constraint where the Country field is Country Dropdown’s Value.

Or, if you insist on using a Text field (and assuming you have consistency in the text used, capitalisation, etc.) then use Country is Country Dropdown’s Display.

When creating a company, I can select a country from dropdown, or I can add it manually if it is not in the list. so the company has a country field from option set and there is a countries field by text type