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

How to Filter Records with AND / OR function?


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

Recommended Posts

Posted

Hi

First of all, I'm new and I'm sorry for my english... its not my nativ language. So I hope I can make myself clear here :

Since I was searching this forum for several days and tried out different things, I thought I'll ask here since I still didnt't get to work it.

The idea is of a basic Budget Template for myself (this way I thought I can get into FileMaker and can design my own Layout :B

Question:

I have 3 fields (dropdown boxes):

- Income ("Einkommen")

- Expenses ("Ausgaben")

- Year

Now I want to make a search to for expl show all records with the date "2006". (I got that so far)

But how do I now resarch (narrow) this Find Result (without loosing it) to show all records that have

Ausgaben = Natel

Einkommen = Lohn

(sorry that those are in German... but my ZIP file is in German as well, so I thought you see which Field I mean.)

As I see, it should be an OR search, but in Perform Find I'll see, that it is only an AND search, which gives me (of course) a wrong result.

I have attached the ZIP file to show you my problem. The search in "Liste" works so far and also the search by "Date to Date" (thanks to this forum :smirk: )

So how should I perform this search (narrow) so I get all Records which have the

Date 2006 AND (Einkommen = "Lohn" OR Ausgaben = "Natel")?

Thanks very much for any help. I hope I was able to make myself clear here :

FindRecord.zip

Posted (edited)

You need two seach criteria, one for Date 2006 AND (Einkommen = "Lohn" OR Ausgaben = "Natel")

Click on FIND, on the date field input 2006 and on the Einkommen type "Lohn" the click on REQUESTS and select ADD NEW REQUEST then type on the date field input 2006 and on the Ausgaben type "Natel".

Edited by Guest
Posted

Hi

Thank you very much Breezer and Raybaudi for your very fast reply!

It's working and I think because of you I'll have a good night tonight (withouth thinking about this problem :B

Thanks very, very much :))

Posted (edited)

Hi

After searching days and trying out several codings, I still do haven't found any answer for two question:

1. Question

===========

I'm trying to find all records "AUS Kostenstelle" for "Natel" in "2006" and show ALL records in "2006" which have anything filled out in "EIN Kostenstelle".

So something like this:

Find Records -> Budget::AUS Kostenstellen: [Natel] AND Budget::cYear [2006]

Find Records -> Budget::EIN Kostenstellen: [==*] AND Budget::cYear [2006]

I somehow can't find the solution to get all records for "EIN Kostenstellen" if there is anything entered.

2. Question

===========

On the "Liste" Tab, I do have a GIF "i" for Information, which leeds to the appropriate record.

Is there a way to show this "i-GIF" only on the right side, IF there was entered any Comment (Bemerkung) from the Tab "Eintrag"?

So if there is nothing in the "Bemerkung", the Information-GIF won't be shown. Is that possible?

Does anybody know an idea how to solve my problems? Or if Question 2 is possible?

Thank you very much for your help :(

Edited by Guest
Posted

***************************

Update January 15th, 2006

***************************

I think I have found the answer to Question 1. :( thanks to the Forum Entry I have found here.

And I'd like to share if someone is interested :

I used a "Set Variabe" with "==*" to find all Records which are not empty.

Still searching the answer for Question 2, so if anybody has an idea how to solve would be appreciated :

_FindRecords.zip

Posted

To show or hide an object you can use what is called the "Visibility" trick. First create a self-relationship (or relationship) that only has a match when your condidtions are true. Then surround the object with a 1-line portal using this relationship, with the line and fill matching the background (else it will flash a bit; but in a list view with alternating rows you usually make it transparent). Since the portal itself is "invisible", even in Layout mode, it's best to group it with the object.

The self-relationship is often from a "flag" field, which = 1 when conditions are met, to a "constant=1" calculation field.

One glitch is that the object is now in the portal, hence related. This sometimes matters in further processing.

It's a bit of trouble, but as you said, only showing a button when it is needed is good interface design.

I did it in your file. But when you flip back to List view your script does all kinds of things, which puts you on a different record. If you must do that then you might want to pop up a little window of a layout with just the Comments fields, which they could then close.

_FindRecords_fej.zip

Posted

Of course, by hiding the button we've made it more difficult for them to go to the form view and add the 1st comment to a record.

Posted

Wow, thanks Fenton!!

I was trying all sort of stuff the whole day today again, but nothing did work. Since I'm new in FM, I never would have found the solution. Thank you very much!!

Yes, you are right with the popup window. I actually even thought that I wanna make a popup window which can be closed by a button. So you even showed me my next step :( :

Thanks for your time to help me out!

This topic is 6887 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.