Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hi

on my layout on want some objects to hide if they match one of two rules, however they only follow the first rule

how can i get both rules to work  ,i have tried using the "or" and "xor" and "and" however get the same results - only the first rule gets followed. (both rules are working as i have put them both first and that one showed)

i would appreciate some support on this issue 

Posted

It's always easier to help if you post what you are having trouble with.

Please post your calc and what you are trying to achieve.

 

Hope this helps,
Agi

Posted

Sometimes it's easier to construct the logic using a Case statement, e.g.:

Case(
	pizza; 1;
	cheeseburger; 1;
	0
	)

 

Posted
1 hour ago, Fitch said:

Sometimes it's easier to construct the logic using a Case statement, e.g.:


Case(
	pizza; 1;
	cheeseburger; 1;
	0
	)

I don't see why that would be any easier than =

pizza or cheeseburger

which does exactly the same thing.

Posted

Imagine instead of pizza and cheeseburger some lengthy/complex calculations.

Posted
5 minutes ago, Fitch said:

Imagine instead of pizza and cheeseburger some lengthy/complex calculations.

Makes no difference to me. At most, I would write:

pizza 
or 
cheeseburger

or perhaps:

Let ( [
pizza = some lengthy/complex calculation ;
cheeseburger = another lengthy/complex calculation
] ;
pizza or cheeseburger
)

 

Posted

btw, the "or" function didn`t work for some reason  , it only 'listened' to the first option.

 

the only way i achieved it was by hide ( not (field)=wanted field)

Posted
26 minutes ago, Smiley said:

the "or" function didn`t work for some reason

Well, there are two possible explanations for that: (a) the or operator (not function) has something against you personally; or (b) it worked just fine, but you did not use it properly. If you don't post your actual calculation, we'll never know (although I do have a favorite).

 

29 minutes ago, Smiley said:

the only way i achieved it was by hide ( not (field)=wanted field)

I am afraid that makes no sense to me.

 

Posted
1 hour ago, comment said:

Makes no difference to me...

 

I'm not arguing against your example, I'm saying for some people (me) it's sometimes easier to work out the logic by breaking the calculations into component parts. Imagine now that you want the calculation to evaluate more than two conditions, some when true, some when false. It can get messy. I find a Case calc sometimes makes this more readable. As for the Let statement, I agree that can help readability, but it can be less efficient, since it has to evaluate all its variables, whereas Case or OR can short-circuit once it reaches a "true" condition.

Posted
11 minutes ago, Fitch said:

I'm not arguing against your example, I'm saying for some people (me) it's sometimes easier to work out the logic by breaking the calculations into component parts.

I am not arguing against that. I am arguing against using the Case() function for this purpose, when the result is Boolean. I might agree in some very special case, though.

 

12 minutes ago, Fitch said:

As for the Let statement, I agree that can help readability, but it can be less efficient, since it has to evaluate all its variables,

Alas, that's true. But it shouldn't be so.

Posted
1 hour ago, Smiley said:

btw, the "or" function didn`t work for some reason  , it only 'listened' to the first option.

 

the only way i achieved it was by hide ( not (field)=wanted field)

OR says that if either option is true, then hide the object.

AND says that both options have to be true before it hides the object.

If you can, as @Agnes Riley suggested, post the calc you are using and an explanation of the rules you have in your head. That would be easier to help you with.

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