June 2, 20169 yr 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
June 2, 20169 yr Here is the help link http://fmhelp.filemaker.com/fmphelp_13/en/html/edit_layout.10.22.html#1171261 There at least 2 videos that cover this, here is one, https://www.youtube.com/watch?v=2JcSc5visG0 Edited June 2, 20169 yr by Lee Smith youtube ref
June 2, 20169 yr 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
June 6, 20169 yr Sometimes it's easier to construct the logic using a Case statement, e.g.: Case( pizza; 1; cheeseburger; 1; 0 )
June 6, 20169 yr 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.
June 7, 20169 yr 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 )
June 7, 20169 yr Author 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)
June 7, 20169 yr 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.
June 7, 20169 yr 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.
June 7, 20169 yr 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.
June 7, 20169 yr 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.
Create an account or sign in to comment