Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Complex find -search multiple fields for one value


This topic is 7778 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Ok, I have a set of fields, labeled "field 1" through "field 10" for example.

The values contained in these fields are from a defined set of possible values, or the fields are empty. No two fields in a record will have the same info though.. For example, let's say that the possible values for these fields are:

a

b

c

d

e

f

g

h

i

For the first record,

field 1 = a

field 2 = b

field 3 = h

field 4 = c

and the rest are blank

second record:

field 1 = b

field 2 = f

field 3 = e

field 4 = h

field 5 = i

and the rest are blank

What I want to do is enter a value, click a "search" button or something, and have it list all the records that one of those fields contains that value:

So if I typed in "a" and searched, it would return the first record, if I typed in "b" and searched, it would return the first and the second records (even though record 1 has "a" in field 1 and record 2 has "a" in field 2) and if I type in "e" and search it will display record 2

See what I'm saying? I'm stumped on how to do this

Posted

Create a calc field: field1 & " " & field2 & " " & field3 & " " & field4 & " " & field5, etc. Do your search on this field.

Posted

hmm... never thought of that. sounds like a good idea. I'm not quite familiar on how filemaker handles searches like that. Would I just do something like

if calc field = "value"?

or would I actually have to search for the value as a substring in the calc field?

do you know what I mean?

Posted

Well, if the field is on a layout, then it would work as you requested. If you're using it for another calculation or script with a specific value in mind, then you'd want to use PatternCount( combofield, " " & fieldx & " " ).

That is, if I understand what you mean. crazy.gif

This topic is 7778 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.