Solved

Hide Coding based on a list of values for a field

Posted on 2013-01-22
6
528 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
  • 3
  • 2
6 Comments
 
LVL 37

Expert Comment

by:TommySzalapski
Comment Utility
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
Comment Utility
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 100 total points
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 37

Accepted Solution

by:
TommySzalapski earned 400 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks Tom

That was just what I needed

Mike
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
@Mailsend 3 19
strCopies  challenge 17 73
WMI, model #, retrieving information 10 85
Microsoft Access combo box help 2 28
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now