Hide When formula through a browser

We have an On-line Ordering system which is viewed through a browser. I am adding a new section which will allow users to add details when they order either a new or replacement PC/Laptop, but this section needs to be hidden if the order doesn’t contain either of these. The code I am using is :

ProdCategory02 = “PC” ;

!@Contains(ProdDesc ; “Replacement” : “New”) ;

ProdQTY < “01”

Now, this works fine when a user does order a replacement or new PC, however if they order, say, a projector then they are still seeing the fields as it is picking up the "ProdQTY < “01"” section of the formula. Any ideas would be much appreciated as I have been racking my brains with this for for the last couple of days!

Subject: Hide When formula through a browser

If you’re the Jon Elliott who used to work at Strand Technology around 2000 - 2002 then please send me a message… phil.rigby@gmail.com

Subject: Hide When formula through a browser

You’ve got three separate logical expressions; one per line. Is that supposed to be one hide-when formula that returns true if any one of the lines is true?

If so, that’s not how hide-when formulas work. They don’t terminate on the first true value. They keep going.

The code you wrote will always execute all three lines, and always return the value of the the last line. I.e, ProdQTY < “01”.

If your goal is to hide the section if line1, line2, or line3 of the formula is true, and otherwise see the section, then what you need is:

 ProdCategory02 = "PC"  | !@Contains(ProdDesc ; "Replacement" : "New") |  ProdQTY < "01" ;

-rich

Subject: Hide When formula through a browser

Why not use @If(ProdCategory02 = “PC”; …

so you only handle this when the condition is true.

Subject: RE: Hide When formula through a browser

Think I have found the issue, however I still don’t know how to resolve it without re-writing the script! The ProdQTY field and ProdDesc field aren’t linked in anyway. So if a user is to order 2 projectors and then a laptop the ProdQTY field will display as:02

01

and the code is only picking the top value and not the value relating to the laptop/pc!

Subject: RE: Hide When formula through a browser

Could you post the exact formula in your hide-when condition? And also explain in more detail, what you refer to as a section? Is this really a Notes section? Is this where the hide-when-formula should go to?

If the code you posted

ProdCategory02 = “PC” ;

!@Contains(ProdDesc ; “Replacement” : “New”) ;

ProdQTY < “01”

was a hide-when-formula, the first two lines would never kick in. Only the last condition would be checked and the object would be hidden, whenever the ASCII code of the text inf field PordQTY was lower that that of “01”.