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

Lookup always going to first item for list detailview


I am trying to achieve direct access to powerapp item detailsview from email.
 

PowerApp-> Add item to Sharepoint list-> flow-> send email with link accessing powerapp item directly.

 

In the email link is like this https://web.powerapps.com/apps/955737dc-d53b-4eca-b71c-92c7ed067a29?ID=6 of Sharepoint list item id.

 

In powerapps Mainscreen OnStart I have given like this If(Not(IsBlank(Param("ID"))),Set(CurrentItem, LookUp('Projects And Tasks POC'.ID,ID = Value(Param("ID"))));Navigate(DetailForm, None)).

 

It is opening all the time 1st item even If  I pass ID=6 or 5 or 4 etc.

How to open proper item detail view using link? Even tried Deeplinking blog also

 

Please provide step by step. 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Lookup always going to first item for list detailview

Hi @Itsmesri,

I have made a test on my side, and don't have the issue that you mentioned.

 

The user @Beat has faced same issue with you, please check my response within the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/OnStart-vs-OnTimerEnd-function/m-p/155294

 

Firstly, please check if you have passed proper ID parameter into your app. You could consider take a try to add a Label control within the screen of your app, set the Text property to following formula:

 

Param("ID")

then check if the ID parameter value is shown up properly.

 

 

Please also check if the Item property of the Display form is set to following:

 

CurrentItem /* <-- return a record value */

 

In addition, I found that there is someting wrong with the LookUp function within the formula you provided. Please modify the formula within OnStart or OnVisible property of your Main Screen to following:

Set(CurrentItem, LookUp('Projects And Tasks POC',ID = Value(Param("ID")))); /* <-- Modify the data source within LookUp function as 'Projects And Tasks POC' rather than 'Projects And Tasks POC'.ID */
If(
!IsBlank(Param("ID")),
Navigate(DetailForm,ScreenTransition.None)
)

or

If(
!IsBlank(Param("ID")),
Set(CurrentItem, LookUp('Projects And Tasks POC',ID = Value(Param("ID"))));Navigate(DetailForm, None)
)

Set the Item property of the Display form control to following:

CurrentItem

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Power Apps Staff LanceDelano
Power Apps Staff

Re: Lookup always going to first item for list detailview

Lookup always goes to the first item in the list of records it gets.  That is by design.  You have to reduce the list further to the record you want with the reduction formula. 

Community Support Team
Community Support Team

Re: Lookup always going to first item for list detailview

Hi @Itsmesri,

I have made a test on my side, and don't have the issue that you mentioned.

 

The user @Beat has faced same issue with you, please check my response within the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/OnStart-vs-OnTimerEnd-function/m-p/155294

 

Firstly, please check if you have passed proper ID parameter into your app. You could consider take a try to add a Label control within the screen of your app, set the Text property to following formula:

 

Param("ID")

then check if the ID parameter value is shown up properly.

 

 

Please also check if the Item property of the Display form is set to following:

 

CurrentItem /* <-- return a record value */

 

In addition, I found that there is someting wrong with the LookUp function within the formula you provided. Please modify the formula within OnStart or OnVisible property of your Main Screen to following:

Set(CurrentItem, LookUp('Projects And Tasks POC',ID = Value(Param("ID")))); /* <-- Modify the data source within LookUp function as 'Projects And Tasks POC' rather than 'Projects And Tasks POC'.ID */
If(
!IsBlank(Param("ID")),
Navigate(DetailForm,ScreenTransition.None)
)

or

If(
!IsBlank(Param("ID")),
Set(CurrentItem, LookUp('Projects And Tasks POC',ID = Value(Param("ID"))));Navigate(DetailForm, None)
)

Set the Item property of the Display form control to following:

CurrentItem

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Itsmesri
Level: Powered On

Re: Lookup always going to first item for list detailview

@v-xida-msft Thank you perfect working

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,161)