Two conditions in appearance possible?

Hi

We are using an expression like minimal search(‘facilities_xx’,‘contains’, ‘label’, *, ‘flt_geoorg’, ${geo_org}) in the appearance column to show a selection list based on values in an external csv file.

Now, we would like to filter based on the beginning AND the end of the value in the respective column. Is this possible? Maybe something like:
minimal search(‘facilities_xx’,‘startswith’, ‘label’, *, ‘flt_geoorg’, ${geo_only}) and minimal search(‘facilities_xx’,‘endswith’, ‘label’, *, ‘flt_geoorg’, ${inst_type})

@york_rff, maybe share with the community a sample XLSForm question and a sample CSV file so that the community should be able to help you out if it’s possible.

…that would be quite complex (if the above syntax question is not straight forward enough).

So, let me read the reaction in the way that is not a usual thing to combine two search functions, and that I have to abandon this potential solution.

We therefore introduced a new filter column flt_geoinstorg in the external csv file. For an exemplary row (which should be listed for selection) it contains “XX.P1.DA.Z1.s.part1”,

We then create two variables in the form:
geo_org = XX.P1.DA.Z1.s.part1
geo_only = XX.P1.DA.Z1.s

Now, it works well, if we put the following in the appearance column:
minimal search(‘facilities_xx’,‘contains’, ‘label’, *, ‘flt_geoinstorg’, ${geo_org})

But it doesn’t work, if we use:
minimal search(‘facilities_xx’,‘startswith’, ‘label’, *, ‘flt_geoinstorg’, ${geo_only})

Do I completely misunderstand the rationale of startswith? Shouldn’t it find XX.P1.DA.Z1.s in XX.P1.DA.Z1.s.part1?

EDIT: And reading now that there is even a “matches” option and that “contains” looks for the search string anywhere in the cell (so far, I thought it is about a match), I tried, but failed:
minimal search(‘facilities_xx’,‘contains’, ‘label’, *, ‘flt_geoinstorg’, ${geo_only})

And just another variation:
minimal search(‘facilities_xx’,‘matches’, ‘label’, *, ‘flt_geoinstorg’, ${geo_org})
doesn’t find XX.P1.DA.Z1.s.part1 in XX.P1.DA.Z1.s.part1 – so the rationale is really unclear.

@york_rff, apologies for getting back to you late. This site should help you correct your syntax if you have got it wrong: