web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Nesting If Statements
Power Apps
Unanswered

Nesting If Statements

(0) ShareShare
ReportReport
Posted on by 41

Hi,

 

I want Field 3 to be conditionally formatted based on dropdown options chosen from Field 1 and dropdown options chosen from Field 2.  How would the IF statement look?  Here is more information:

 

A & B are dropdown options of Field 1

1, 2, 3, and 4 are dropdown options of Field 2

a, b, c, and d are dropdown options of Field 3 that are conditionally formatted based on what is chosen from Field 1 and Field 2

 

These are the outcomes I’m trying to achieve:

If A + 1 = a

If A + 2 = a

If A + 3 = b

If A + 4 = b

 

If B + 1 = c

If B + 2 = c

If B + 3 = d

If B + 4 = d

 

 

I tried this using this formula from combo box fields and it didn't work:

If(Field1 = A,
If(Or(Field2 = 1, Field2 = 2),
a,
b)
,
If(Or(Field2 = 1, Field2 = 2),
c,
d)
)
)

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,889 Most Valuable Professional on at

    Hi @kpromma ,

    There does not appear anything wrong with your code based on your description - you might try this

    Switch(
     FieldA,
     "A",
     If(
     Field2 = 1 || Field = 2,
     "a",
     "b"
     ),
     "B",
     If(
     Field2 = 1 || Field = 2,
     "c",
     "d"
     )
    )

    but what is your actual code based on the drop-down outputs and where are you using it ?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • kpromma Profile Picture
    41 on at

    Hi.  The field I have that needs the nested if statement is a combobox.  I'm trying to add the statement to the "Items" function of the dropdown.

     

    This is what I tried, but it's not correct:

     

    If(DataCardValue24.Selected.Value=”Office of Research Admin”,If(Or(DataCardValue25.Selected.Value=”Grants and Research Cost Reimb Soft”,DataCardValue25.Selected.Value=”Grants and Research Cost Reimb Hard”),DataCardSelectedValue26.Selected.Value=”PROV Costs ORA”,DataCardSelectedValue26.Selected.Value=”PROV Costs NonORA”), If(Or(DataCardValue25.Selected.Value=”Grants and Research Cost Reimb Soft”,DataCardValue25.Selected.Value=”Grants and Research Cost Reimb Hard”),DataCardValue26.Selected.Value=”PROV Amount ORA”,DataCardValue26.Selected.Value=”PROV Amount NonORA”)))

  • kpromma Profile Picture
    41 on at

    My scenario changed.  Field 2 now only has 2 options.  My fields are choice options from a List and the datacards are combobox dropdowns (DataCardValue###).

     

     

    Field 1 (Oversight Group):

    • A (ORA)
    • B (Other)

    Field 2 (Invoice Method):

    • a (cost reimbursable invoice)
    • b (amount based invoice)

    Field 3:

    • 1 (PROV Amount NonORA)
    • 2 (PROV Amount ORA)
    • 3 (PROV Costs NonORA)
    • 4 (PROV Costs ORA)

    Field 3 is conditionally formatted based on what is chosen from Field 1 and Field 2

     

    These are the outcomes I’m trying to achieve:

    If A + a = 4

    If A + b = 2

    If B + a = 3

    If B + b = 1

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard