cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Itsmesri
Helper I
Helper I

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
v-xida-msft
Community Support
Community Support

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
LanceDelano
Power Apps
Power Apps

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. 

v-xida-msft
Community Support
Community Support

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

@v-xida-msft Thank you perfect working

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,280)