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

Create multiple deep links with records

Hi,

I am trying to create 2 deep links that open up to 2 different screens based on the record selected from each of the galleries. Below are the syntaxes:

 

At OnStart:

Set(VarEmpID,Value(Param("EmpID")));

If(VarEmpID<>0,Set(VarEmp,LookUp('MasterList',ID=VarEmpID));

Navigate('Emp Details'));

 

Set(VarClearanceID,Value(Param("ClearanceID")));

If(VarClearanceID<>0,Set(VarClearance,LookUp('MasterList',ID=VarClearanceID));

Navigate(EmpClearanceSummary));

For 1st Deep Link

 

 

 

For 2nd Deep Link

 

1st Deep Link

 

At the Emp Gallery screen

Gallery NextArrow:

Set(VarEmp,ThisItem); Navigate('Emp Details')

 

At the Emp Details screen:

EditForm.Item:

VarEmp

 

SendLink_Button.OnSelect:

Office365Outlook.SendEmailV2("MyEmail@email.com", "Subject" , "<a href='https://apps.powerapps.com/play/{App ID}?EmpID="& VarEmp.ID &"'>link</a>")

 

2nd Deep Link

 

At the Clearance Gallery screen:

Gallery NextArrow:

Set(VarClearance,ThisItem); Navigate('EmpClearanceSummary')

 

At the EmpClearanceSummary screen:

EditForm.Item:

VarClearance

 

SendLink_Button.OnSelect:

Office365Outlook.SendEmailV2("MyEmail@email.com", "Subject", "<a href='https://apps.powerapps.com/play/{App ID}?ClearanceID="& VarClearance.ID &"'>link</a>")

 

The 1st one is working fine.

But the 2nd one is not working, I am able to open up to the EmpClearanceSummary screen but without the record I expected (i.e empty). When I tried to select a record from the Clearance Gallery, it also navigated to an empty EmpClearanceSummary screen. How can I solve this?

1 ACCEPTED SOLUTION

Accepted Solutions
tanst_844288
Helper I
Helper I

I tried again the solution by @WarrenBelz ,

This is the link https://powerusers.microsoft.com/t5/Building-Power-Apps/Deep-Linking-with-Multiple-Scrrens/td-p/7011...

 

Its working for me now, I tried previously but didn't manage to get it work because I didn't set the gallery next arrow the first time I tried. (Sorry, I am still learning having started powerapp a few months back)

 

So below are the formulas. I removed the second global variable (VarClearance) for the 2nd deep link & used VarEmp for both deep links- I think can only use one global variable.

 

At OnStart:

Set(VarEmpID,Value(Param("EmpID")));

If(VarEmpID<>0,Set(VarEmp,LookUp('MasterList',ID=VarEmpID)));

If(
Param("Screen") = "View", Navigate('Emp Details'),
Param("Screen") = "Clearance", Navigate(EmpClearanceSummary)
)

 

 

1st deep link --> View

2nd deep link--> Clearance

 

1st Deep Link

 

At the Emp Gallery screen

Gallery NextArrow:

Set(VarEmp,ThisItem); Navigate('Emp Details')

 

At the Emp Details screen:

EditForm.Item:

VarEmp

 

SendLink_Button.OnSelect:

Office365Outlook.SendEmailV2("MyEmail@email.com", "Subject" , "<a href='https://apps.powerapps.com/play/{App ID}?EmpID="& VarEmp.ID &"&Screen=View'>link</a>")

 

2nd Deep Link

 

At the Clearance Gallery screen:

Gallery NextArrow:

Set(VarEmp,ThisItem); Navigate('EmpClearanceSummary')

 

At the EmpClearanceSummary screen:

EditForm.Item:

VarEmp

 

SendLink_Button.OnSelect:

Office365Outlook.SendEmailV2("MyEmail@email.com", "Subject", "<a href='https://apps.powerapps.com/play/{App ID}?EmpID="& VarEmp.ID &"&Screen=Clearance'>link</a>")

 

View solution in original post

5 REPLIES 5
NandiniBhagya20
Solution Sage
Solution Sage

I think instead of comparing varEmpID and VarClearanceID to not equals to 0, you should check for whether it's blank or not as you are not passing both the parameters in the URL.


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

tanst_844288
Helper I
Helper I

Hi @NandiniBhagya20 ,

Thanks for the fast reply. Do you mean to write something like this?

If(!IsBlank(VarClearanceID), Set(VarClearance,LookUp('MasterList',ID=VarClearanceID)))

NandiniBhagya20
Solution Sage
Solution Sage

Yes you can try this, I am not sure if it will work, but we can give it a try 


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

tanst_844288
Helper I
Helper I

It still not working, the outcome is the same as before...

tanst_844288
Helper I
Helper I

I tried again the solution by @WarrenBelz ,

This is the link https://powerusers.microsoft.com/t5/Building-Power-Apps/Deep-Linking-with-Multiple-Scrrens/td-p/7011...

 

Its working for me now, I tried previously but didn't manage to get it work because I didn't set the gallery next arrow the first time I tried. (Sorry, I am still learning having started powerapp a few months back)

 

So below are the formulas. I removed the second global variable (VarClearance) for the 2nd deep link & used VarEmp for both deep links- I think can only use one global variable.

 

At OnStart:

Set(VarEmpID,Value(Param("EmpID")));

If(VarEmpID<>0,Set(VarEmp,LookUp('MasterList',ID=VarEmpID)));

If(
Param("Screen") = "View", Navigate('Emp Details'),
Param("Screen") = "Clearance", Navigate(EmpClearanceSummary)
)

 

 

1st deep link --> View

2nd deep link--> Clearance

 

1st Deep Link

 

At the Emp Gallery screen

Gallery NextArrow:

Set(VarEmp,ThisItem); Navigate('Emp Details')

 

At the Emp Details screen:

EditForm.Item:

VarEmp

 

SendLink_Button.OnSelect:

Office365Outlook.SendEmailV2("MyEmail@email.com", "Subject" , "<a href='https://apps.powerapps.com/play/{App ID}?EmpID="& VarEmp.ID &"&Screen=View'>link</a>")

 

2nd Deep Link

 

At the Clearance Gallery screen:

Gallery NextArrow:

Set(VarEmp,ThisItem); Navigate('EmpClearanceSummary')

 

At the EmpClearanceSummary screen:

EditForm.Item:

VarEmp

 

SendLink_Button.OnSelect:

Office365Outlook.SendEmailV2("MyEmail@email.com", "Subject", "<a href='https://apps.powerapps.com/play/{App ID}?EmpID="& VarEmp.ID &"&Screen=Clearance'>link</a>")

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

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