?
Solved

Hide Coding based on a list of values for a field

Posted on 2013-01-22
6
Medium Priority
?
542 Views
Last Modified: 2013-12-18
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
0
Comment
Question by:BulldogMike
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 38807649
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.
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 38807657
Since lotus notes uses VBA, you may want the actual word "and" if the & doesn't work.
0
 
LVL 3

Assisted Solution

by:jjphardy
jjphardy earned 400 total points
ID: 38810911
Is DRG_DEA_CLC a list? If so != will not work. Unless all the values in a list are the same this will always return false.

Even if it is not a list. or not equal to will always return a false.



This may work for you.
val_list="0001" :"0002":"0003" :"0004":"0005";
in_list=(DRG_DEA_CLC = val_list);
hide_paragraph=!(in_list);
hide_paragraph;

It is not that clear if you want to hide or show your paragraph if DRG_DEA_CLC is equal to the values you supplied. I am assuming you want to show the paragraph.

val_list is a list of the values you want to test against.
in_list should be true if DRG_DEA_CLC is equal to any value in the list.
hide_paragraph will be false if DRG_DEA_CLC is equal to any value in the list.
The last line is what the formula will evaluate to.
If it is false, the paragraph will not hide.
If it is true the paragraph will show.
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 37

Accepted Solution

by:
TommySzalapski earned 1600 total points
ID: 38811374
Since DRG_DEA_CLC != "0001" worked, I think that using "and" is all that is needed.
Saying "X does not equal 1 or 2 or 3" in English translates to "X != 1 and X != 2 and X != 3" in programming. It's a very common source of confusion.
0
 

Author Comment

by:BulldogMike
ID: 38818660
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"
0
 

Author Closing Comment

by:BulldogMike
ID: 38818712
Thanks Tom

That was just what I needed

Mike
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question