Smiley Posted June 2, 2016 Posted June 2, 2016 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
Lee Smith Posted June 2, 2016 Posted June 2, 2016 (edited) 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, 2016 by Lee Smith youtube ref
Agnes Riley Posted June 2, 2016 Posted June 2, 2016 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
Fitch Posted June 6, 2016 Posted June 6, 2016 Sometimes it's easier to construct the logic using a Case statement, e.g.: Case( pizza; 1; cheeseburger; 1; 0 )
comment Posted June 6, 2016 Posted June 6, 2016 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.
Fitch Posted June 7, 2016 Posted June 7, 2016 Imagine instead of pizza and cheeseburger some lengthy/complex calculations.
comment Posted June 7, 2016 Posted June 7, 2016 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 )
Smiley Posted June 7, 2016 Author Posted June 7, 2016 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)
comment Posted June 7, 2016 Posted June 7, 2016 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.
Fitch Posted June 7, 2016 Posted June 7, 2016 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.
comment Posted June 7, 2016 Posted June 7, 2016 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.
Josh Ormond Posted June 7, 2016 Posted June 7, 2016 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now