?
Solved

ASP / VB script logic "IF" error

Posted on 2013-10-28
3
Medium Priority
?
308 Views
Last Modified: 2013-10-28
I have the code below, but its wrong because it will only display the region IF ALL are <> "", what I need is code that will display the region whenever at least ONE of the fields is not NULL.

--

<% If ( _
(Customfields.Fields.Item("lbl_field1").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field2").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field3").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field4").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field5").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field6").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field7").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field8").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field9").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field10").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field11").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field12").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field13").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field14").Value) <> ""  AND _
(Customfields.Fields.Item("lbl_field15").Value) <> ""  ) _

THEN %>

REGION HERE
               
<%End If%>

---
0
Comment
Question by:amucinobluedot
[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 Comments
 
LVL 33

Accepted Solution

by:
Big Monty earned 1000 total points
ID: 39606175
just change the word "AND" to "OR"
0
 
LVL 15

Assisted Solution

by:pateljitu
pateljitu earned 1000 total points
ID: 39606176
Replace "AND _" with "OR _", this way if any of the field has value IF statement will be true.
0
 

Author Closing Comment

by:amucinobluedot
ID: 39606191
Duh (To me)
0

Featured Post

Tutorial: Introduction to Managing a Linux Server

In this tutorial on systemd, we will explore:
-OS/Distro Adoption
-chkconfig and Other Legacy Commands
-Summary and Key Commands

Question has a verified solution.

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

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

765 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