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 / Set choice field if an...
Power Apps
Answered

Set choice field if another field is filled out

(0) ShareShare
ReportReport
Posted on by 2

I have 2 date fields. When they're both filled out, I want to update the Status (choice field) field to scheduled. How do I accomplish this?

 

Screenshot 2023-12-07 at 12.54.39 PM.png

Categories:
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Well assuming these are in a gallery and those two datepickers defaults are jus tlinking to the sp records date in a certain column you can have this as the items in a dropdown

    ["Planned", "Scheduled"]

     

    and this as the dropdowns defaults

    If(IsBlank(SecondColumnName), "Planned", "Scheduled")



    If it's two datepickers not connected to anything you have to make sure they are both first set to default Blank()

    have the loading of this screen, or the button that shows these controls include

    Reset(DatePicker1); Reset(DatePicker2); Reset(Dropdown1)

     

    have dropdown 1s default be

    If(!Or(IsBlank(DatePicker2), IsBlank(DatePicker1)), "Scheduled", "Planned")

     

    onchaneg of each calendar is

    Reset(Dropdown1)

     

    and that will autoselect the right one, on my test i also set a reset button with the same

    Reset(DatePicker1); Reset(DatePicker2); Reset(Dropdown1)

     

    so i could verify what occcuyrs when calendars set back to blank

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @infoCRA,

    Just set the DefaultSelectedItems property of the Status combobox as below:

    If(!IsBlank(DatePicker_startdate.SelectedDate) &&!IsBlank(DatePicker_stopdate.SelectedDate),{Value:"Scheduled"})
  • infoCRA Profile Picture
    2 on at

    I don't want it to be the default though. I only want it to happen once the dates are set. Sometimes the first choice is Plan, then the date fields get filled by someone else, then it should set to Scheduled.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard