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 / Using IF statement in ...
Power Apps
Answered

Using IF statement in a Patch for a Status choice column in Dataverse

(0) ShareShare
ReportReport
Posted on by 870 Super User 2026 Season 1
Hello -
 
What I thought was straight forward apparently isn't!
Appreciate the help in advance.
 
What is the syntax for the conditional patch in this scenario?
 
I want to patch the Status choice column in Dataverse table to value 'In Review' if the Correction Type combo box selected value is 'Missing Punch', otherwise, the Status is 'Submitted'.
 
 
 
 
          //'Status (cr10e_status)':If(CorrectionType.Selected.Value = "Missing Punch", "In Review", "Submitted")
 
 
Thanks!
Categories:
I have the same question (0)
  • Power Platform 1919 Profile Picture
    2,205 Super User 2026 Season 1 on at
    Hi @Cgangweg01,

    it should be 

    'Status (cr10e_status)':If(CorrectionType.Selected.Value = "Missing Punch", 'Status (cr10e_status)'.'In Review', 'Status (cr10e_status)'.Submitted)

    if this fails try with,

    'Status (cr10e_status)':If(CorrectionType.Selected.Value = "Missing Punch", 'Status (PayrollCorrectionRequests)'.'In Review', 'Status (PayrollCorrectionRequests)'.Submitted)

     
  • Suggested answer
    Kalathiya Profile Picture
    1,690 Super User 2026 Season 1 on at
    Hello @Cgangweg01
     
    The field won’t accept "In Review" or "Submitted" as text, and it also won’t accept a {Value:"In Review"} record for choice columns.
     

    It expects the actual Option Set value, which must be referenced like this:

    'Status (cr10e_status)'.'In Review'
    
    Try this code in Patch for update the status conditionally: 
    'Status (cr10e_status)':
        If(
            CorrectionType.Selected.Value = "Missing Punch",
            'Status (cr10e_status)'.'In Review',
            'Status (cr10e_status)'.Submitted
        )
    
    📩 Need more help? Mention @DeveloperAK anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping.
  • Cgangweg01 Profile Picture
    870 Super User 2026 Season 1 on at
     
    Thank you for the replies.
    This has gotten me the closest, pictured. But I'm getting the following error now. I pasted the line below.
     
    Any suggestions now?
     
     
     
    'Status (cr10e_status)':If(CorrectionType.Selected.Value = "Missing Punch", 'Status (PayrollCorrectionRequests)'.'In Review','Status (PayrollCorrectionRequests)'.Submitted)
     
     
    It boggles my mind why there are no single quotes around submitted at the end of this when there are single quotes around the status prior.
     
    Thanks again!
  • Verified answer
    Power Platform 1919 Profile Picture
    2,205 Super User 2026 Season 1 on at
     
    Can you try this 
     
    'Status (cr10e_status)':
    If(Text(CorrectionType.Selected.Value)="Missing Punch",
    'Status (PayrollCorrectionRequests)'.'In Review',
    'Status (PayrollCorrectionRequests)'.Submitted)
     
    Or
     
    'Status (cr10e_status)':If(CorrectionType.Selected.Value='Status (PayrollCorrectionRequests)'.'Missing Punch','Status (PayrollCorrectionRequests)'.'In Review','Status (PayrollCorrectionRequests)'.Submitted)
  • Verified answer
    Power Platform 1919 Profile Picture
    2,205 Super User 2026 Season 1 on at
    And for the single quote, we generally add quotes for choices with multiple words (example :In Review).
     
    And we didn't add any quotes for submitted is because it is single word.
     
    This is my thumb rule for remembering this can be wrong also as some choices have special characters too. In that case we have to add quotes.
  • Cgangweg01 Profile Picture
    870 Super User 2026 Season 1 on at
     
    Thank you for the explanations! Really appreciate that.
     
    Got it to work with this as your replied as I was interpreting the error.
     
            'Status (cr10e_status)':If(CorrectionType.Selected.Value = 'CorrectionType (PayrollCorrectionRequests)'.'Missing Punch', 'Status (PayrollCorrectionRequests)'.'In Review','Status (PayrollCorrectionRequests)'.Submitted)

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 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard