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 / Updating Form Field On...
Power Apps
Answered

Updating Form Field On Toggle

(0) ShareShare
ReportReport
Posted on by 302

Hello,

I have set the Allowance Payment OnCheck to varShowDate and should Disable A and B respective allowing Month of Leave Allow Payment to show. Now, I also need the already-selected date in A and B to be cleared off on the same varShowDate initiated. Cos right now, it's still holding the values already entered and passing it to my SharePoint List. The concept is, if you Select Yes, you can only Select Month and A and B wouldn't apply. It's optional.

 

Here is the code I used to disable A and B:

 

If(varShowDate,DisplayMode.Disabled,DisplayMode.Edit)

 

Virikefe22_1-1675240967265.png

 

ALSO, 

The Shift is a Single line of text in the SharePoint List and I used Radio button to input the options here ["A", "B", "C"] but it's not passing the value to SharePoint List when form is submitted.

 

Any useful suggestion here would help.

 

Thanks guys!

 

 

Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Virikefe22 ,

     

    The answer to both of your questions lies in amending the Update property of the datacards. This property is what determines what actually gets send to the data source when submitting the form.

     

    For the dates you need to include some logic that evaluates the value of the varShowDate variable:

    If(varShowDate, Blank(), DataCardValueXX.SelectedDate)

     

    For the shifts you need to pass the value of the selected item in the Radio control:

    RadioX.Selected.Value

     

    In all of the above you will need to insert the correct identifier for the controls that contain the values you want to save, so replace DataCardValueXX and RadioX with the names of your controls.

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Virikefe22 ,

     

    For the first question, you can modify the Update properties of the two data cards. 

    If(varShowDate,Blank(),DatePicker.SelectedDate)

     

    For the second question, you should also modify the Update property, as follows:

    Radio1.Selected.Value

     

    Best regards,

  • Virikefe22 Profile Picture
    302 on at

    Thanks @BCBuizer @v-jefferni 

    It both worked. But now, I need to return/reverse the function for the month selection (DataCardValue14). Meaning that if the varShowDate is false, let it pass blank value in DataCardValue14. I tried this but it didn't work:

     

    If(varShowDate,false,Blank(),DataCardValue14.Selected)

     

     

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Virikefe22 ,

     

    The provided formulas already take care of this as they are. Looking at the syntax for the If function:

     

     

    If(
     varShowDate, //this is the condition. since the variable is a boolean, you don't need anything else
     Blank(), //this is executed when the the condition is true, in this case Blank() is saved to the data source
     DataCardValue14.Selected // this is executed when the condition is false, so this is saved to the datasource
    )

     

     

    Hope this clarifies.

  • Virikefe22 Profile Picture
    302 on at

    Hello @BCBuizer , you didn't this case scenario now.

    The first A and B cases are solved already. Now, look at the case of C in the screenshot. If the Toggle is turned off (No), let no selected value of C (DataCardValue14) be passed to the SharePoint List.

    The cases for A and B have been solved already, note.

    Virikefe22_0-1675259034976.png

     

  • Verified answer
    BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Virikefe22 ,

     

    If you wish to reverse things, there are two ways of doing it:

     

    1. simply switch the actions to be executed

    If(varShowDate,DataCardValue14.Selected, Blank())

     2. Reverse the value of the variable with an ! operator:

    If(!varShowDate,Blank(),DataCardValue14.Selected)

     

  • Virikefe22 Profile Picture
    302 on at

    Thanks @BCBuizer but where or to what do I apply either of these?

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Virikefe22 ,

     

    Either of these can be applied to the Update property of the Month data card. The result of both is the same.

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 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard