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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change Yes/No field wh...
Power Apps
Answered

Change Yes/No field when modify date field

(0) ShareShare
ReportReport
Posted on by 258

Hi,

 

I have a simple form with date field and choice field (Yes/No). when user changed the existing date field value, automatically choice column should be changed to No. 

 

Any suggestions?

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

    Hi @sachk1 ,

    Set a Variable OnChange of the Date Picker

    UpdateContext({varChanged: true})

    and the Default of the Checkbox - assumeig you are saving to and displaying a data source field in it.

    If(
     varChanged,
     false,
     Parent.Default
    )

    also at Screen OnVisible

    UpdateContext({varChanged: false})

     

    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

     

  • sachk1 Profile Picture
    258 on at

    Hi thank you for reply., this is not working. error in Default of the choice field. any suggestions

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    @sachk1 ,

    I assumed you meant yes/no (true false) - are you using a drop-down or a combo box to choose the value ?

  • sachk1 Profile Picture
    258 on at

    Hi,

     

    I used a choice column in sharepoint. (Dropdwon ), by default its in "No" status. after a mail it change to "Yes". Then after that if user changed the date again I need to change to "No" status

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    @sachk1 ,

    OK - you did not specify the drop-down of combo box question, but I will give you both answers

    Drop-down Default

    If(
     varChanged,
     "Yes",
     Parent.Default
    )

    Combo Box DefaultSelectedItems

    {
     Value: 
     If(
     varChanged,
     false,
     YourChoiceFieldName.Value
     )
    }

     

    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

  • sachk1 Profile Picture
    258 on at

    Hi, thank you for helping. However the formula is not correct.

  • Verified answer
    sachk1 Profile Picture
    258 on at

    The following works for the DefaultSelectedItems

    {
    Value: If (
    varChanged,
    false,
    ThisItem.'Email Status'.Value
    )
    }

     

    For the Default , the expression gives an error.

     

    If(
    varChanged,
    "Yes",
    Parent.Default
    )

     

    Is there any mistake done here?

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    @sachk1 

    Is this a drop down or combo box  and what is the field name and type it is reading from/ writing to ?

  • sachk1 Profile Picture
    258 on at

    its a dropdown. I achieved through the above expression I mentioned and without an expression for default. And thats work well.

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    @sachk1 ,

    If a drop down, the you need the Default property and writing to a Choice fiels

    {
     Value: 
     If(
     varChanged,"Yes",
     ThisItem.YourChoiuceFieldName.Value
     )
    }

     

    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

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard