cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PytByt
Post Prodigy
Post Prodigy

IF with multiple OR

Hi all.. 

I just simply want to make this formula works:

If(txt_MS_manual_ItemCategory.Text = "NC Baloon" || txt_MS_manual_ItemCategory.Text = "Comply Baloon" || txt_MS_manual_ItemCategory.Text = "Cutting Baloon", "Baloon", "Stent DES", "Stent BMS", "Guidewire PCI")

My condition is:
The result will be "Baloon" IF the text is "NC Baloon" OR "Comply Baloon" OR "Cutting Baloon"
Else will be anything else beside those baloon ("Stent DES", "Stent BMS", "Guidewire PCI")

I can't make it work though, 

Please help. 

Thanks.

pytbyt

1 ACCEPTED SOLUTION

Accepted Solutions

FYI, 

We also can done it like this:

If(
    txt_MS_manual_ItemCategory.Text = "NC Baloon" || "Comply Baloon" || "Cutting Baloon", 
    "Baloon", 
    txt_MS_manual_ItemCategory.Text
)


Cheers.

 

pytbyt 

View solution in original post

3 REPLIES 3
mdevaney
Super User
Super User

@PytByt 

For the else condition you should write your text in the 3rd argument as shown below.

If(
    txt_MS_manual_ItemCategory.Text = "NC Baloon"
    || txt_MS_manual_ItemCategory.Text = "Comply Baloon"
    || txt_MS_manual_ItemCategory.Text = "Cutting Baloon", 
    "Baloon", 
    "Else condition text here"
)

 

It is not necessary or possible to list out several options in the format "Stent DES", "Stent BMS", "Guidewire PCI".

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

Hi @mdevaney 

Thank you for the reply, i found out that i can use the control object it self as ELSE as in below formula.

If(
    txt_MS_manual_ItemCategory.Text = "NC Baloon"
    || txt_MS_manual_ItemCategory.Text = "Comply Baloon"
    || txt_MS_manual_ItemCategory.Text = "Cutting Baloon", 
    "Baloon", 
    txt_MS_manual_ItemCategory.Text
)

 
I hope this will also help for those who sometimes confused on using formula like i do. 

Cheers, 

Regards.

pytbyt

FYI, 

We also can done it like this:

If(
    txt_MS_manual_ItemCategory.Text = "NC Baloon" || "Comply Baloon" || "Cutting Baloon", 
    "Baloon", 
    txt_MS_manual_ItemCategory.Text
)


Cheers.

 

pytbyt 

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (4,067)