Skip to main content

Notifications

Community site session details

Community site session details

Session Id : c21QZwNgQfZdC5jBY1Odmd
Power Apps - Building Power Apps
Answered

Deep linking into my app

Like (1) ShareShare
ReportReport
Posted on 15 Oct 2024 18:51:46 by 4
Hi there - 
 
I have a power app that almost does what I want. It's backed by a Sharepoint list and displays details about upcoming features. I have a left nav vertical gallery (called LeftNav) that filters the features by a couple of dropdown options like priority. The OnSelect function I originally had in place is Select(Parent)
 
On the right I've got a main container that holds text input and dropdown fields to display (and edit, in edit mode) the columns that describe the feature. They set the default value based on the left nav selection, like LeftNav.Selected.Title.
 
All is working beautifully so far. 
 
I want to create a deep link that causes the left nav to select the ID that's specified in the URL. I have a deep link creator button that links to my app with an OnSelect property of  Launch("[appURL]?ID=" & LeftNav.Selected.ID). That part works - I get a properly functioning link with the ID appended as a query string. But that URL doesn't cause the screen to focus on the feature ID that's specified in the URL - I still get the default view. 

I've got the left nav items' OnSelect property  set as 
Select(Parent); 
Set(SelectedFeatureID, ThisItem.ID); 
 
I've got the app's OnStart property set as 
If(
    !IsBlank(Param("ID")),
    Set(SelectedFeatureID, Value(Param("ID"))),
    Set(SelectedFeatureID, Blank())
);
 
And I've got the screen's (there's only one) OnVisible property set to 
 
If(   
    !IsBlank(SelectedFeatureID),   
    Set(SelectedFeatureItem, LookUp(Features, ID = SelectedFeatureID)),
    Set(SelectedFeatureItem, Blank())
);
 
I feel like I'm close, but something is missing here. Does anyone know where I've gone wrong?
  • Verified answer
    Michael E. Gernaey Profile Picture
    42,060 Super User 2025 Season 1 on 17 Oct 2024 at 07:20:58
    Deep linking into my app
    Hi
     
    What you need to do is take the incoming value, and then literally Set the gallery selected item based on that value.
     
    You are also not clear as there is no picture, on what does "it just shows the default view"
     
    My guess is, you mean that its not "going to the proper record" selecting it, and then having the view Change based on that.
     
    What you Need to do is Update the Default Property of the Gallery.
     
    In the Default, do a check
     
    If(!IsBlank(SelectedFeatureID), LookUp(Features, ID = SelectedFeatureID))
     
    And it will set the selected Item in the Gallery to THAT item, but only if SelectedFeatureId is NOT blank
     
  • Suggested answer
    CU15102032-0 Profile Picture
    10 on 16 Oct 2024 at 22:34:24
    Deep linking into my app
    It sounds like you're on the right track with your analysis. The issue appears to stem from the fact that your design is relying on a gallery selection to display data rather than using screen navigation or other controls that directly respond to query parameters.





    If this resolves your issue, please don't forget to like and mark it as a verified answer
  • CU15101831-0 Profile Picture
    4 on 16 Oct 2024 at 16:39:25
    Deep linking into my app
    Thank you both!
     
    When I say that it's not functioning as expected, this is the experience without a deep link in play (and this experience is desirable):
    • The navigation displays all the features. The default selection is the first feature in the gallery.
    • The default feature data that displays on the main container is the first feature in the navigation gallery.
    • When I click on any feature in the navigation gallery, the data displayed in the fields in the main container updates to show the data for the feature I selected
    All of that is by design. What doesn't work is that, if I navigate to the app with a query string that specifies a feature ID (?ID=123), the default experience still happens. I see the feature information for the first in the list, just as if I'd come to the app without a query string. 
     
    It looks like I'm mostly doing exactly what the documentation prescribes, but I think the problem I've created for myself is that my design is not screen-based. I have a single screen, and I'm relying on a selection from the navigation pane to filter the information that displays in the main pane. So I think the problem is that the gallery won't allow a selection that is specified by a query string, and I need to rethink my design.
     
    Does that sound right?
  • WarrenBelz Profile Picture
    146,966 Most Valuable Professional on 15 Oct 2024 at 21:30:56
    Deep linking into my app
    I am trying to understand what is not working here - I you have a numeric Variable SelectedFeatureIDset to the incoming parameter and a Record Variable SelectedFeatureItemset to the matching record (all seems correct here). Where are you using these and what is not functioning as expected  - I do not understand what you mean by  doesn't cause the screen to focus on the feature ID that's specified in the URL
  • Suggested answer
    CU15102032-0 Profile Picture
    10 on 15 Oct 2024 at 21:11:40
    Deep linking into my app
    You can view the solution by clicking on DeepLink Article, which provides a detailed guide to implementing deep linking in your app.

     

     

    If this resolves your issue, please don't forget to like and mark it as a verified answer

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 106 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 73

#3
stampcoin Profile Picture

stampcoin 52

Overall leaderboard
Loading started