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 / Toggle OnChange partia...
Power Apps
Unanswered

Toggle OnChange partially works

(0) ShareShare
ReportReport
Posted on by 1,625

Hello,

 

A bit of a strange one, not sure if its a bug:

  • I have a toggle, when it's changed from it's default no (false) to yes (true) it resets 3 other values on the screen. ✔️ this works. The code I have OnChange of the toggle is (the setting of variable can be ignored as not relevant here 😞
    If(DataCardValue70.Value = true, Set(FurtherReview, "Sent for further review");Set(Reviewer1DropdownValue,Blank()), Reset(DataCardValue67)&& Reset(DataCardValue73) && Reset(DataCardValue72))​
  • DataCardValue67 is a dropdown, with the above code this gets reset,  ✔️ this works when the toggle is changed. 
  • DataCardValue72 and DataCardValue73 are also reset when the toggle is changed to true ✔️
  • DataCardValue72 and DataCardValue73 are only visible if DataCardValue67 (dropdown) has "Rejected" or "conditional". ✔️

    The problem is if I choose from the dropdown  "Rejected" or "Conditional" and then set the toggle to yes (true) this no longer displays  DataCardValue67 (the dropdown) as its visible property is set to only display if the toggle is false so that works but, when the dropdown is not visible it should not display either DataCardValue72 and DataCardValue73.
    What I need to do is set the toggle back to no and then set it back to yes, for it to function the way It should and that works but I cannot get the users to do this... any ideas as to why this isn't working the first time of changing the toggle?
Categories:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    Hi!

     

    Have you tried making the other two datacardvalues visible only if:

    DataCardValue67.Visible 

     

    Cheers,

    Sancho

  • TJO Profile Picture
    230 on at

    @Lefty Could you try to set the visible property of DataCardValue72 and DataCardValue73 to : 

     

    If(
     And(
     !DataCardValue67.Value,
     Or(
     DataCardValue67.SelectedText.Value = "rejected", DataCardValue67.SelectedText.Value = "conditional"
     )
     ), 
     true, 
     false
    )
  • Lefty Profile Picture
    1,625 on at

    hi @iAm_ManCat 

    I have indeed set the visible property of one of the datacards to:

    DataCardValue67.Selected.Value = "Rejected"

    As mentioned this works fine, it's when I change the toggle from false to true, after selecting rejected in the dropdown, this then displays the rejected datacard, which only goes away if I uncheck and check the toggle again, it's as if its not resetting completely the first time the toggle is changed  

  • Lefty Profile Picture
    1,625 on at

    Hi @TJO 

     

    Tried this, same happens as what I had set up.

    @TJO @iAm_ManCat 

    I've just tested something.

    I have placed some random text in the rejected text box and then changed the toggle to true, as stated the dropdown (datacardvalue67 and its datacard) become hidden, but the rejected text box stays visible, but the text does not reset either, so it appears my code is only resetting the first datacard upon the first time of changing the toggle from false to true:
    If(DataCardValue70.Value = true, Set(FurtherReview, "Sent for further review");Set(Reviewer1DropdownValue,Blank()), Reset(DataCardValue67)&& Reset(DataCardValue73) && Reset(DataCardValue72))​


  • Verified answer
    TJO Profile Picture
    230 on at

    @Lefty The reset statements are in the Else part of the if formula

  • Lefty Profile Picture
    1,625 on at

    @TJO 

     

    Ha, perfect thanks

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard