cancel
Showing results for 
Search instead for 
Did you mean: 

if then else statement in webi

Former Member
0 Kudos

I am new to webi, very familiar with variable in deski but webi seems more challenging.  I have a list of 250 names, and I want to break them out into regions so I want to create if name in list then central, esle if in list north, etc. 

I have tried to create the variable but it's failing once it get to the second statement.  I have pasted my exact variable below. Can someone assist me?


In addition, and this seems like such a novel thing but for the life of me I cannot figure out how to change the colors in a table in webi?? Any help is greatly appreciated. 

Thanks!

= If( ([ZB Standard Name Rollup] InList ("Capital University Law School";"Case Western Reserve University School of Law";"Chicago-Kent College of Law";"Cleveland State University College of Law";"Creighton University School of Law";"DePaul University College of Law";"Drake University Law School";"Hamline University School of Law";"Indiana University School of Law - Bloomington";"Indiana University School of Law - Indianapolis";"John Marshall Law School - Chicago";"Jones School of Law";"Louisiana State University Law Center";"Loyola University School of Law - Chicago";"Loyola University College of Law - New Orleans";"Marquette University Law School";"Michigan State University College of Law";"Northern Illinois University College of Law";"Northwestern University School of Law";"Ohio Northern University College of Law";"Ohio State University College of Law";"Oklahoma City University School of Law";"Saint Louis University School of Law";"Southern Illinois University School of Law";"Southern University Law Center";"Thomas M. Cooley Law School";"Tulane University Law School";"University of Arkansas School of Law - Fayetteville";"University of Arkansas School of Law - Little Rock";"University of Chicago Law School";"University of Cincinnati College of Law";"University of Dayton School of Law";"University of Detroit Mercy School of Law";"University of Illinois College of Law";"University of Iowa College of Law";"University of Kansas School of Law";"University of Michigan Law School";"University of Minnesota Law School";"University of Missouri School of Law - Columbia";"University of Missouri School of Law - Kansas City";"University of Nebraska College of Law";"University of North Dakota School of Law";"Notre Dame Law School";"University of Oklahoma College of Law";"University of South Dakota School of Law";"University of St. Thomas School of Law";"University of Toledo College of Law";"University of Tulsa College of Law";"University of Wisconsin Law School";"Valparaiso University School of Law";"Washburn University School of Law";"Washington University School of Law";"Wayne State University Law School";"William Mitchell College of Law";"Albany Law School")))Then "Central” else if ( ([ZB Standard Name Rollup] InList ("Albany Law School";"Boston College Law School";"Boston University School of Law";"Brooklyn Law School";"Cardozo School of Law";"City University of New York School of Law";"Columbia University School of Law";"Cornell Law School";"Penn State University School of Law";"Drexel University School of Law";"Duquesne University School of Law";"Fordham University School of Law";"Harvard Law School";"Hofstra University School of Law";"Massachusetts School of Law";"New England Law";"New York Law School";"New York University School of Law";"Northeastern University School of Law";"Pace University School of Law";"Quinnipiac University School of Law";"Roger Williams University School of Law";"Rutgers University School of Law - Camden";"Rutgers University School of Law - Newark";"Seton Hall University School of Law";"St. Johns University School of Law";"Suffolk University Law School";"Syracuse University College of Law";"Temple University School of Law";"Touro College Law Center";"Tufts University School of Law";"SUNY Buffalo Law School";"University of Akron School of Law";"University of Connecticut School of Law";"University of Maine School of Law";"University of Massachusetts School of Law - Dartmouth";"University of New Hampshire School of Law";"University of Pennsylvania Law School";"University of Pittsburgh School of Law";"Vermont Law School";"Villanova University School of Law";"West Virginia University College of Law";"Western New England University School of Law";"Widener University School of Law - Harrisburg";"Widener University School of Law - Wilmington";"Yale Law School";"American University College of Law"))) then “Northeast” else if ( ([ZB Standard Name Rollup] InList ("American University College of Law";"Appalachian School of Law";"Ave Maria School of Law";"Barry University School of Law";"Belmont University College of Law";"Birmingham School of Law";"Campbell University School of Law";"Catholic University School of Law - Ponce";"Catholic University School of Law - Washington";"Charleston School of Law";"Charlotte School of Law";"Duke University School of Law";"Elon University School of Law";"Emory University School of Law";"Florida A&M University College of Law";"Florida Coastal School of Law";"Florida International University College of Law";"Florida State University College of Law";"George Mason University School of Law";"George Washington University Law School";"Georgetown University Law Center";"Georgia State University College of Law";"Howard University School of Law";"Inter American University School of Law";"John Marshall Law School - Atlanta";"Liberty University School of Law";"Lincoln Memorial University School of Law";"Mercer University School of Law";"Mississippi College School of Law";"Nashville School of Law";"North Carolina Central University School of Law";"Northern Kentucky University College of Law";"Nova Southeastern University Law Center";"Regent University School of Law";"Samford University School of Law";"Savannah Law School";"St. Thomas University School of Law";"Stetson University College of Law";"University of Alabama School of Law";"University of Baltimore School of Law";"University of Florida College of Law";"University of Georgia School of Law";"University of Kentucky College of Law";"University of Louisville School of Law";"University of Maryland School of Law";"University of Memphis School of Law";"University of Miami School of Law";"University of Mississippi School of Law";"University of North Carolina School of Law";"University of Puerto Rico School of Law";"University of Richmond School of Law";"University of South Carolina School of Law";"University of Tennessee College of Law";"University of the District of Columbia School of Law";"University of Virginia School of Law";"US Army JAG School";"Vanderbilt University Law School";"Wake Forest University School of Law";"Washington and Lee University School of Law";"William & Mary Law School";"Abraham Lincoln University School of Law"))) then “Southeast” else if ( ([ZB Standard Name Rollup] InList("Abraham Lincoln University School of Law";"American Heritage University School of Law";"Arizona State University College of Law";"Baylor University School of Law";"Brigham Young University Law School";"California Northern School of Law";"California School of Law";"California Southern University School of Law";"California Western School of Law";"Chapman University School of Law";"Concord Law School";"Concordia University School of Law";"Empire College School of Law";"Golden Gate University School of Law";"Gonzaga University School of Law";"Humphreys College School of Law";"John F. Kennedy University College of Law";"Lewis & Clark Law School";"Lincoln Law School - Sacramento";"Lincoln Law School - San Jose";"Loyola Law School - Los Angeles";"Novus Law School";"Oak Brook College of Law";"Pacific Coast University School of Law";"University of the Pacific School of Law";"Pepperdine University School of Law";"Phoenix School of Law";"San Joaquin College of Law";"Santa Barbara & Ventura College of Law - Santa Barbara";"Santa Barbara & Ventura College of Law - Ventura";"Santa Clara University School of Law";"Seattle University School of Law";"South Texas College of Law";"Southern California Institute of Law";"Southern Methodist University School of Law";"Southwestern Law School";"St. Francis School of Law";"St. Marys University School of Law";"Stanford University Law School";"Texas Southern University School of Law";"Texas Tech University School of Law";"Texas Wesleyan University School of Law";"Thomas Jefferson School of Law";"Trinity Law School";"University of Arizona College of Law";"University of California School of Law - Berkeley";"University of California School of Law - Davis";"University of California College of Law - Hastings";"University of California School of Law - Irvine";"University of California School of Law - Los Angeles";"University of Colorado Law School";"University of Denver College of Law";"University of Hawaii School of Law";"University of Honolulu School of Law";"University of Houston Law Center";"University of Idaho College of Law";"University of La Verne College of Law";"University of Montana School of Law";"University of Nevada School of Law";"University of New Mexico School of Law";"University of Oregon School of Law";"University of San Diego School of Law";"University of San Francisco School of Law";"University of Southern California School of Law";"University of Texas School of Law";"University of Utah College of Law";"University of Washington School of Law";"University of West Los Angeles School of Law";"University of Wyoming College of Law";"Western State College of Law";"Whittier Law School";"Willamette University College of Law"))) then “Western”

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kate,

I tried your formula, and just small modification required. Instead of Else If, make it ElseIf (without space). Please see below:

Regarding changing the colors in table, you are looking for Alerter functionality. Please see below link, which will give you step-by-step idea of all the functionalities.

http://www.slideshare.net/bwobily/web-intelligence-tutorial4

I have assumed that you are BO 4.0. In case you are XI 3.1, please let us know. I will provide new steps for Alerter.

Former Member
0 Kudos

Thanks for the response, it's actually XI 3.1.  I tried the elseif correction but that doesn't seem to be the issue. It's failing at position starting with "Albany" in the second string. 

Former Member
0 Kudos

Hi Kate,

The only problem which I faced at my end with your condition block was double-quote for all 4 resultant values which are "Central", "Northeast", etc. Its not double-quote but its some special character, just try to re-type the double-quote in webi for all 4 resultant condition. It might be possible that you are preparing this condition in word/wordpad/notepad and webi is not able to understand some characters.

If above solution does not work out then, To troubleshoot your problem, divide the whole condition in 4 different blocks with only one If condition at a time. And we will try to figure out the problem, by one block at a time.

First take only "Central" condition block and put it as variable formula. And parse it. If parse is successful then this block is ok syntax wise.

Then take only "Northeast" condition block and put it as variable formula. And parse it. If parse is successful then this block is ok syntax wise.'

Do the same for other 2 condition blocks.

You should be able to find out the block with problem.

Former Member
0 Kudos

I got it! Thank you so much for your help.

Now onto the formatting situation.  There has to be a way to change the color of my tables right?

Former Member
0 Kudos

Hi Kate,

If you need to change just color of table then right click on table and select properties. Go to background color and change.

But if you are looking for conditional formatting then refer to following link.

http://www.scribd.com/doc/73285516/Business-Objects-XI-3-1-Beginner-Guide-for-u

Former Member
0 Kudos

That's the weird thing. I get taken tot he properties box but it doesn't allow me to select anything? It's just a blank box. 

Answers (2)

Answers (2)

Former Member
0 Kudos

It took me a minute to see it, but it looks like "Albany Law School" is in the list for both "Central" and

"Northeast". It is the last entry in the "Central" InList and the first in the "Northeast". You might want to remove it from the InList that it is not supposed to be in.

Hope this helps,

Paul

Former Member
0 Kudos

Thanks Paul, I found that in between these threads and corrected it

Former Member
0 Kudos

While Hardik has tidied your If statement up, I'd really recommend pushing this solution back to the database and getting a region column added - the maintenance of this will be horrendous.

Former Member
0 Kudos

Thanks, not going to be an option.