Filter by multiple fields

I have a garden database with over 200 plants. This is the query I use to filter the list on the left by field “Garden”:


This is the procedure to filter the list by “Garden” contains “Field” (This garden is named Field - Just realized I should have used a different one of my gardens in this example):

I think the last line is redundant but it works.

My question: How do I make this list show the plants in the garden “Field” AND only show the plants that are trees?

I appreciate continued your help on this database over the past year. I have learned so much.

Any help with this question is also greatly appreciated.

I give you an example where I am using several criteria to search a words list, to show only words (and their length) starting or containing certain letters at certain positions.


The Query property contains this code:

(LSuche="" or Length <= val(LSuche)) and (Anfang="" or Words beginswith Anfang) and (Ende="" or Words endswith Ende)  and (Enthalten = "" or Words contains Enthalten) and (Position = "" or  Words[val(Position);length(Enthalten)] = upper(Enthalten))
1 Like

I believe I have this working. When I tried to do an “AND” in my query I did not have parentheses. I had abc and xyzzy instead of (abc) and (xyz).

Thank you for the prompt response.

In your quest, you are using the plural,“plants”, but in your procedure code, you are using the verb, “find”. I could be wrong, but it’s my understanding that Find puts you on one record while, “Select” gives you all records that match your criteria.

Here is what I use to accomplish my goal. I made changes to my query to include 'Type":

Here is the procedure I use. If I leave out the last line, the list updates but the Plant Info may continue to show the previously selected record (even though the plant may not be on the current list). By including the last line, the procedure switches to the desired list and selects the first record of the new list.

I appreciate your input. I hope this is clear. I am definitely not a PanX power user so I might not be explaining this correctly. This works for me but there is probably a better way to do this.

For what it’s worth, I am using popupclick to access my procedures. Jim suggested this a while back and it really helped me.

That would be correct if he was displaying the data in the data sheet, but in this case @neonate is using a Text List, and the query formula is built into the Text List.

You’ve figured it out. The parentheses aren’t necessary for a simple formula, but since you are combining AND and OR, you need to tell Panorama how to combine these in the correct order.

Exactly. Lines 1 thru 4 set up the query in the Text List, then line 5 moves the current record to the first record that is displayed.

You might want to change the last line to this:

find Garden contains showingGarden

Then if you ever wanted to change “Arbor” to something else, you would only have to re-type it once. But it’s only 5 characters, so maybe not a big deal.

1 Like

Thank you. I will start using the variable in the last line. I have been the victim of misspellings too many times to count.

Cleaned up the procedure. I’m learning. Slowly, but I’m learning. Again, thanks.