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.
Solved! Go to Solution.
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.
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.
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?
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.
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.
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.
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!
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
181 | |
137 | |
96 | |
83 |