cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
digiservice
Level: Powered On

Switch no longer working in 3.19111.26

I have a gallery with icons that have their visibility set using a Switch function and rules.

 

I know that rules are being depreceated but these don't seem to be the root of the issue

 

Something like this:

 

ico_cross : Visibility :

Switch(
ThisItem.Screen,
FormPage1, If( rule_FormPage1 = true, false, true ),
FormPage2, If( rule_FormPage2 = true, false, true ),
FormPage3, If( rule_FormPage3 = true, false, true )
)

This works fine in the currently published version which is using 3.19104.33.


I went to edit the app today and noticed that the Switch is no longer working this is using releasr 3.19111.26.

 

I removed the rules and replaced them with a test condition as so:

 

ico_cross : Visibility :


Switch(
ThisItem.Screen,
FormPage1, If(1+1=2  = true, false, true ),
FormPage2, If(1+1=2  = true, false, true ),
FormPage3, If(1+1=2  = true, false, true )
)

Still the switch did not work.

I changed the Switch to and Or with nested If statements as follows:

Or(
If(ThisItem.Screen = FormPage1, If(rule_FormPage1 = true, true, false)),
If(ThisItem.Screen = FormPage2, If(rule_FormPage2= true,true,false)),
If(ThisItem.Screen = FormPage3, If(rule_FormPage3= true,true,false))
)

And this works, correctly.

 

Has something happened to the Switch function?

 

7 REPLIES 7
digiservice
Level: Powered On

Re: Switch no longer working in 3.19111.26

I've created a test in a new app and can replicate this. Please see the attached screenshots.

 

This seems to be specifically a problem with using "screen"

EdwardAhn
Level: Powered On

Re: Switch no longer working in 3.19111.26

Hi, my app is having the exact same issue since the new PowerApps release. I'm glad someone else found the common root cause.

I was using a series of conditions that determined what the next screen would be, and using a switch statement to navigate to the screen. This has stopped working and I've been going crazy trying to fix this.

Would love to have a MS response to this. 

Community Support Team
Community Support Team

Re: Switch no longer working in 3.19111.26

Hi @EdwardAhn  and @digiservice ,

Do you mean that you can not use Switch function about Screen?

I've made a similar test but not met the same problem.

I set the gallery's arrow button's OnSelect:

Switch(ThisItem.Name,"abc",Navigate(Screen1),"aaa",Navigate(Screen3))

 It will navigate to screen correctly.

Here's my PowerApps version: 3.19111.28

 

I suggest you clear your browser's cache, update to the latest version, try this again by using the latest version of PowerApps.

If the problem still exists, I suggest you ask for help here:

https://powerapps.microsoft.com/en-us/support/pro/ticket/

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
EdwardAhn
Level: Powered On

Re: Switch no longer working in 3.19111.26

Hi @v-yutliu-msft thanks for your response, but this bug is present when the switch statement happens on the screen control. In your example you have the switch on ThisItem.Name.

 

If you look at @digiservice's switchfunction.png screenshot, you can see how you can replicate this error. I've replicated this myself on a simple test app.

 

Thanks

 

Edit: FYI current PowerApps release for my test app = 3.19111.33

 

EdwardAhn
Level: Powered On

Re: Switch no longer working in 3.19111.26

Hey folks, I created an app that demonstrates the problem + the If workaround, and submitted a ticket (case 119111723000225).

 

I also noticed another issue related to this - if you store the screen control as a global variable and browse the Variables tab to see its current value, it appears with blank details.

Power Apps Staff sridutt
Power Apps Staff

Re: Switch no longer working in 3.19111.26

@digiservice @EdwardAhn Thanks for reporting this issue. Currently If can be used as workaround for issue that you are facing, I will update here once issue with Switch is resolved.

EdwardAhn
Level: Powered On

Re: Switch no longer working in 3.19111.26

FYI for others who may be encountering issues. There is another bug related to using screen controls in operator statements:

DOES NOT WORK

ScreenVariable in [‘Screen1’,’Screen2’,’Screen3’]

 

WORKS

Or(ScreenVariable = ‘Screen1’,ScreenVariable = ’Screen2’,ScreenVaraible = ’Screen3’)

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,470)