Multiple Or Statements

bjornliow
New Contributor II

Hi I am trying to add conditional formatting to my CubeView to bold certain rows, so that it stands out for my users.

I'm using treedescendants(i) to list out all the accounts to minimize any maintenance, so I can't bold the rows individually. Also, the accounts I want bolded are not in the same indentation level, so I can't use that expression.

I tried using If (MemberDescription = 'Apple') Or (MemberDescription = 'Orange') Then Bold = True End If.

This works, but if I tried adding another Or statement, it would not work: 

Eg:  If (MemberDescription = 'Apple') Or (MemberDescription = 'Orange') Or (MemberDescription = 'Banana') Then Bold = True End If. 

Is there another workaround for multiple Or statements/ how should I update my condition? 

3 REPLIES 3

RobbSalzmann
Valued Contributor

Seems to be working for me:  Maybe post a screenshot of your logic.  Could be a typo you're not seeing. Happens to me all the time.

RobbSalzmann_0-1711411291672.png

RobbSalzmann_1-1711411321323.png

 

 

I noticed that if the member description contains a comma, then the formatting would not work. Other descriptions without a comma would work.

Eg: Descriptions:

  1. Apple Fruit
  2. Orange Fruit
  3. Banana, Fruit

Test:

  • If (MemberDescription Contains 'Apple') Or (MemberDescription Contains 'Orange') Or (MemberDescription Contains 'Banana')
    • All bolded 
  • If (MemberDescription Contains 'Apple Fruit') Or (MemberDescription Contains 'Orange Fruit') Or (MemberDescription Contains 'Banana')
    • All bolded
  • If (MemberDescription Contains 'Apple Fruit') Or (MemberDescription Contains 'Orange Fruit') Or (MemberDescription Contains 'Banana, Fruit')
    • None bolded 
  • If (MemberDescription Contains 'Apple') Or (MemberDescription Contains 'Orange') Or (MemberDescription Contains 'Banana, Fruit')
    • None bolded

 

RobbSalzmann
Valued Contributor

Nice catch!
Yep,  My rule is never use commas or ampersands in member names or descriptions.