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 / Radio Button Default a...
Power Apps
Unanswered

Radio Button Default and UpdateIf Issue

(0) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2

The following formula is not causing ants to march across my screen.

 

Anyone notice anything that would prevent this mass migration?

 

Radio1 Control - OnChange:

     UpdateIf('Member List', ID=ThisItem.ID, {ComplianceStatus: If(Self.SelectedText.Value="NA","Compliant","Noncompliant")})

 

Radio1 Control - Items 

     ["NA","Compliant","Noncompliant"]

 

Radio1 Control - Default

     Switch(Toggle1.Value,false,"NA",
                 Toggle2.Value=true,"Compliant","Noncompliant")

 

All functionality between these controls is working fine; except the UpdateIf it's updating when the Radio1 control position is auto-matically changed. The control visually is changing back and forth between the three options whent he toggles are manipulated. However, those changes are not being reflected in a Update to the MemberList through the Radio1 control 'OnChange' language shown above.

Categories:
I have the same question (0)
  • GarethPrisk Profile Picture
    2,828 on at

    For the boolean controls (Checkbox, Toggle), you have to be very careful using the OnChange, OnCheck, OnUncheck hooks. Otherwise, you can get into scenarios where it becomes an infinite loop (recursive), and things will not behave as you'd expect. With the layered Toggle's - this may be the case.

     

    You can check the monitor to see if multiple calls are being registered. Additionally, you can add a counter to your function to track if/when it is being recursively triggered. Something like

     

    UpdateContext({locCounter: locCounter + 1});

     

    Where is Toggle1 and Toggle2? It looks like the Radio Control may be in the Gallery - are the toggles?

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Thank you for the reply. Yes, I've experienced the 'infinite loop'. This is not that.

     

    All controls are in the same Gallery pulling data from the same MemberList.

     

    Again, if I manully trigger the toggles their individual 'UpdateIf' work fine. One toggle can triggle the other from 'true' to 'false' and both 'UpdateIf' actions fire to the MemberList. If I manually trigger the Radio control it's 'UpdateIf' work fine. It's when I try the formula to automatically trigger the Radio control to 'switch' to 'NA' from 'Compliant', or any other configuration the visually the action happens on the screen (you can see the green compliance dot just to the red noncompliance dot, however no 'UpdateIf' occurs.

  • Verified answer
    WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @Phineas ,

    I thought I gave you the answer on this post.

    Here is a test I did - a radio control's OnChange simply does not trigger unless it is changed at the control - I have a Notify on the OnChange of the Radio Control.

    ChangeTrigger.gif

     

    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.

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    That is fantastic!

     

    Sorry for the run-around. 

     

    I know my assumption was correct; I just couldn't get the language straight.

     

    So, I ran from the issue - for expediency sake - and found another way.

     

    Good to see it works; maybe someone else can use it.

     

    Thanks again!

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard