[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Hide Coding based on a list of values for a field

Posted on 2013-01-22
6
Medium Priority
?
544 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
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

873 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