Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 22o35Mh7LATXcVoSvBECJc
Power Apps - Building Power Apps
Answered

Change Status when submitted date is selected

Like (1) ShareShare
ReportReport
Posted on 3 Jul 2024 20:59:37 by

My Project status is a choice column in Dataverse, when a date in the Permit Submitted Column is selected in the form on Power Apps, I want the status to change to "In Review".

This is my OnSelect formula so far:

Patch('Permit Management','Permit List'.Selected,{})
Permit Management is the name of my Dataverse Table. Permit List is the name of my Gallery in the app.
I tried putting 'Project Status':   inside the {} but no matter if I add Choices or Value, it won't accept an input.
I tried;
Patch('Permit Management','Permit List'.Selected,{'Project Status':Value:"In Review"})
as well as 
Patch('Permit Management','Permit List'.Selected,{'Project Status':Choices:"In Review"})
but it does not work.
 
I'm fairly new to this, so it may be a simple fix, just thought I'd ask.
  • marshallzart Profile Picture
    on 05 Jul 2024 at 19:47:28
    Re: Change Status when submitted date is selected

    Got it.... Thanks Mike

  • Michael E. Gernaey Profile Picture
    41,027 Super User 2025 Season 1 on 05 Jul 2024 at 19:46:23
    Re: Change Status when submitted date is selected

    in your error in your image 2, you are trying to compare the NAME of the Date Control toa Date Value

     

    you need to use 

    Control.SelectedValue = Today()

     

    Not the control name


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Michael E. Gernaey Profile Picture
    41,027 Super User 2025 Season 1 on 05 Jul 2024 at 19:44:59
    Re: Change Status when submitted date is selected

    Hi @marshallzart 

     

    The issue it is showing is your = sign between a Date Comparison and the other side. So can you tell me what the error is there? Its nothing to do with the Option.

     

    However

     

    1. In the first one you typed, you typed [ThisItem.'Project Status'].InReview

    What you are doing is trying to use the VALUE of Project status to be the Option Set

    Option sets are accessed by using the Global Scoped Format or Local Table Format

     

    so if you look at mine you would have

    'Project Status': [@'Project Status'].InReview <=== is essentially a hardcoded value, versus your second one using the Dynamic Value property of a ComboBox.Selected.Value

     

    The [@] Format means, I want to grab the VALUE I am listing from the Option set.

     

    Your second one is perfect because you used the Selected Value and you see its not red because its correct

    FLMike_0-1720208512120.png


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

  • marshallzart Profile Picture
    on 05 Jul 2024 at 15:42:17
    Re: Change Status when submitted date is selected

    I also tried this one

    marshallzart_0-1720194130742.png

     

  • marshallzart Profile Picture
    on 05 Jul 2024 at 14:27:27
    Re: Change Status when submitted date is selected

    I can't get to work when I try and change it using my custom names. I'm sure I'm doing it wrong. Again, I want to change the Project Status to "In Review" when I select a date in the Permit Submitted field.

     

    marshallzart_1-1720189689258.png

     

     

  • Verified answer
    Michael E. Gernaey Profile Picture
    41,027 Super User 2025 Season 1 on 03 Jul 2024 at 21:45:41
    Re: Change Status when submitted date is selected

    HI @marshallzart 

     

    Here I have a table, with a Global choice as a column. Choice is Called DemoChoice and column is called MyChoice and a table called TableA.. Yes I am very good at naming things lol.

     

    Now I want to update it from A to C

    Patch(TableAS, LookUp(TableAS, Name = "My Record"), { MyChoice: [@DemoChoice].C });

     

    FLMike_0-1720042713764.png

    FLMike_1-1720042934764.png

     

    If you bind a Choice Field to a Combo or Dropdown (single select mind you)

     

    Ill patch it to D using a combo Box

    FLMike_2-1720043016231.png

     

    Now my Code

     

    Patch(TableAS, LookUp(TableAS, Name = "My Record"), { MyChoice: Combo1_1.Selected.Value }); 

     

    FLMike_3-1720043106103.png

     

    FLMike_4-1720043134946.png

     

    And Done


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard