cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChristopherU
Frequent Visitor

Navigate when a record is selected in Power BI?

Hello! I am new to PowerApps. I am loving it so far but I cannot for the life of me figure out a solution to the problem I am currently facing.

 

We've built a Power BI dashboard for a client with a PowerApp built-in. Currently, when a user selects a record in Power BI, it filters a gallery in the PowerApp to just the selected record, and then the user can select that record by clicking on the gallery item which takes them to the next relevant screen. This works fine but it is redundant as it effectively forces the user to click the same record twice in two separate places.

 

What we want is for the app to navigate to the next screen when the user selects the record in Power BI. I feel like I must be missing something, because it seems this would be very simple.

 

Is it possible to create a listener/event handler that triggers when an item is selected in PowerBI?

 

Alternatively, since selecting the record in PowerBI filters the data down to only the selected record, I was trying to implement a solution in which the app navigates to the correct screen when CountRows(PowerBIIntegration.Data.<column>) <=1.

 

Is there a way to set global navigation rules such as this? For example, I have a text label that renders CountRows(...). Can I execute Navigate() every time the value changes based on whether or not it is greater than 1? 

7 REPLIES 7
BCBuizer
Super User
Super User

Hi @ChristopherU ,

 

Unfortunately I can't test this, but perhaps it's an idea to use a TextInput control to hold, let's say, the title of the selected record in Power BI. You can then use the OnChange property to navigate. If you include a Reset(TextInput), in theory, every time you select a record in Power BI, a navigate action should be performed in PowerApps.

ChristopherU
Frequent Visitor

Thanks so much for your response! This seems quite promising, but I haven't had any luck with it yet. When the TextInput is updated by a formula it doesn't appear to trigget OnChange.

 

Where would I include Reset(TextInput)?

BCBuizer
Super User
Super User

Hi @ChristopherU , 

 

The Reset() can be inserted after the Navigate() command, separated by a semicolon (;).

ChristopherU
Frequent Visitor

Thanks a lot! This would have been a perfect solution but unfortunately, as far as I can tell, OnChange() is only triggered when a user changes the text and presses enter, not when the output of a formula changes.

BCBuizer
Super User
Super User

Hi @ChristopherU ,

 

From what I read, it should work with a ComboBox:

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/Catch-changing-input/td-p/290494

 

Perhaps that's worth a try.

ChristopherU
Frequent Visitor

This didn't work for me - perhaps it was a 'bug' that was 'fixed' between then and now.

BCBuizer
Super User
Super User

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,789)