Forum Discussion

bjornliow's avatar
bjornliow
New Contributor II
9 months ago

Multiple Or Statements

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? 

  • RobbSalzmann's avatar
    RobbSalzmann
    Valued Contributor II

    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.

     

     

    • bjornliow's avatar
      bjornliow
      New Contributor II

      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's avatar
    RobbSalzmann
    Valued Contributor II

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