Link to home
Start Free TrialLog in
Avatar of BulldogMike
BulldogMikeFlag for United States of America

asked on

Hide Coding based on a list of values for a field

OK  I give up – you code it – mine is not working

I am trying to code the hiding or displaying of a section of text, a subform and a layout region in Lotus Notes v5 as follows:  

If the value for Field A (DRG_DEA_CLC) is not equal to “0001” or “0002” or “0003” or “0004” or “0005” hide it, otherwise display it.   DRG_DEA_CLC != "0001" works but not the rest

Here are my hiding coding failures so far in the hide/display box:
 
DRG_DEA_CLC != "0001" | DRG_DEA_CLC !="0002" | DRG_DEA_CLC !="0003" |
DRG_DEA_CLC!="0004" | DRG_DEA_CLC != "0005"

DRG_DEA_CLC != "0001" | 0002" | "0003" | 0004" | != "0005"

Thanks - I hate Syntax

Mike
Avatar of TommySzalapski
TommySzalapski
Flag of United States of America image

You want "and" not "or"

My guess is you want DRG_DEA_CLC != "0001" & DRG_DEA_CLC !="0002" etc etc

Everything is either not 1 or not 2, you want things that are both not 1 and not 2 etc.

So take your first attempt and replace every | with & and see how that works.
Since lotus notes uses VBA, you may want the actual word "and" if the & doesn't work.
SOLUTION
Avatar of jjphardy
jjphardy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BulldogMike

ASKER

Thanks for your replies, I have been out of the office for 2 days

Clarification of my Request:

I want to code the hiding or display of 1) some text 2) a layout region and 3) a sub-form based on the value of the DRG_DEA_CLC component.  

In English: If the value of DRG_DEA_CLC is not equal to "0001 or not equal to "0002" or not equal to "0003" or not equal to "0004" or not equal to "0005" then hide it or display it as appropriate.  

I also have other 1) text 2) another layout region and 3) another sub-form to display or hide if the value of DRG_DEA_CLC is not equal to "0000".  

I have tried your suggestions with varying degrees of success.

Thanks for your attention to this request

 Mike - "I hate syntax"
Thanks Tom

That was just what I needed

Mike