Please bear with me as I am new to PowerApps, and maybe trying to do something that is not supported. I am trying to Navigate PowerApp Screens based on a DAX Measure I am passing to the PowerApp via the PowerBIIntegration. Is this even possible? The goal being, the User switches PowerBI Reports and the App changes Screens based on the Report the User is currently viewing. Is there a better way to do this? I would prefer not to create/manage two separate PowerApps.
Thanks in advance!
The code below throws the error "incompatible types for comparison" between the variable ScreenValue and Reservation/Reserved:
Set(ScreenValue, First(PowerBIIntegration.Data.Screen)); If(ScreenValue="Reservation", Navigate(ReservationScreen)); If(ScreenValue="Reserved", Navigate(ReservedScreen))
This sounds like a great idea / use case.
I have never seen this done before.
Consider posting this in the ideas section:
@Jcook Well, dang! Not the answer I was hoping for. Thanks for the reply though, and obviously you have seen a lot.
Just in case, I have played around with it a bit more, and it's almost working!
//PowerBIIntegration.Refresh(); Collect(colScreen, PowerBIIntegration.Data.Screen); Set(ScreenValue, First(colScreen).Screen); If(ScreenValue = "Reserved", Navigate(ReservedScreen),Navigate(ReservationScreen)); ClearData(ScreenValue)
No errors, and it sometimes switches to the correct Screen. If I reload the tab a lot. Then after a while it stops. So I am assuming some sort of cache issue.
I guess I am assuming at this point the OnStart doesn't fully run when you switch PowerBI Reports. Maybe @RezaDorrani has an idea? Or maybe a good youtube video can come from this? 😀