I have a SharePoint list being rendered through a PowerApp dataTable onto the page(shows a list of sharepoint items). One of the columns is a link that takes the user to a pop-up showing the details of the single item that was selected, so updates can be made.
When I provide a link to the specific item using DeepLinking (https://play.apps.appsplatform.us/play/xxx83938?tenanteid=03923&requestID=59), I am successfully taken to that specific item. Here's the issue I am facing, when I navigate away from the item back to the PowerApps page with the list of items and click on a different link, it still shows the item from the deeplinking. I believe it's because the url doesn't change and my app is still referencing the item with reqeustID=59 which is in the URL.
How can I fix this?
Here's what I have on the App OnStart
Set(firstRun,true);
If(
Value(Param("requestID")) <> 0,
Set(
itemID,
LookUp('Registration', ID=Value(Param("requestID"))
)
);
Set(firstRun,false);
Navigate(EditScreen)
)
Solved! Go to Solution.
In your initial email you said there was a point in the app where they navigate away from the details and back to the list. I would do it there. After that you want the app to act normally right - not using the info from the deep-link?
Sounds like you just need to reset the value in your OnSelect that opens your pop-up. If you are always using itemID then you just need to Set that value in the OnSelect to the item that was clicked
How is your itemID global variable being used?
You mention that it is being set during app OnStart. If you're using it elsewhere, but not setting it again, it may be causing the issue you described where it is reverting back to the passed in parameter value.
How do I do this?
My OnSelect on my back button is this
If(Value(Param("requestID")) <> 0,
Set(
itemID,
{SelectedItem: DataTable6.Selected}
)
);
Navigate(Admin);
When I click back, no matter what item details I go to, it pulls up the same item because of the parameter in the querystring. How do I deal with that?
@BrianS I used itemID when I'm using Param() but I can't see to use DataTable6.Selected, when I click the back button.
If(Value(Param("requestID")) <> 0,
Set(
itemID,
{SelectedItem: DataTable6.Selected}
)
);
Navigate(Admin);
May be able to refactor that, and see if it helps.
If(Value(Param("requestID")) <> 0,
Set(
itemID,
DataTable6.Selected
)
);
Navigate(Admin);
Whatever is selected in DataTable6 is inherently a record, so you won't need to try to change it. Since your initial setting is a LookUp (returns a record), this may simplify this a bit.
Are you trying to see the Param exists? Is there a scenario where it would come in as 0?
It will come in as zero if the Admin navigates to the PowerApp through the browser and not the link
I think the problem may be that once they arrive from the link the Parameter will always have data, so the non-zero check will always be true. I think you need to reset your ItemID to the selected item after the initial interaction, or it will continue to be reset to the Parameter version
In your initial email you said there was a point in the app where they navigate away from the details and back to the list. I would do it there. After that you want the app to act normally right - not using the info from the deep-link?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
183 | |
51 | |
47 | |
32 | |
32 |
User | Count |
---|---|
266 | |
91 | |
78 | |
68 | |
67 |