cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Doosan_Dean
Frequent Visitor

URL variable recognition Deep Linking

I have an app that produces two different varID's in a url link depending on which page you are emailing from. the variables are varAJID & varKZID. The formula I pasted below works for the AJID part but if a url has a KZID in it it only brings you to the 'homescreen' rather than completing the logic that would bring you to the correct screen.

 

Is there a way to have powerapps recognize if the url that is opening the app contains one variable or the other? 

 

Set(varAJID, Value(Param("AJID")));
Set(varKZID, Value(Param("KZID")));

If (varAJID <> 0, Set(varRecord, LookUp(A2JActivityList, ID = varAJID)); Navigate([@ActivityCommentsScreenAJ]),
If (varKZID <> 0, Set(varRecord, LookUp(K2ZActivityList, ID = varKZID)); Navigate([@ActivityCommentsScreenKZ])))

 

I've been struggling with this for days, any suggestions are appreciated,

 

Thank you!

7 REPLIES 7
WarrenBelz
Super User
Super User

Hi @Doosan_Dean ,

At App OnStart

If(
   !IsBlank(Value(Param("AJID")),
   Set(varAJID, Value(Param("AJID"));
   Navigate([@ActivityCommentsScreenAJ]),
   !IsBlank(Value(Param("KZID")),
   Set(varKZID, Value(Param("KZID"));
   Navigate([@ActivityCommentsScreenKZ]),
   Navigate(WhereNoParamsSent . .)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @Doosan_Dean ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.,

There is one thing you could change here as well.

If(
   !IsBlank(Param("AJID")),
   Set(varAJID, Value(Param("AJID")));
   Navigate([@ActivityCommentsScreenAJ]),
   !IsBlank(Param("KZID")),
   Set(varKZID, Value(Param("KZID")));
   Navigate([@ActivityCommentsScreenKZ]),
   Navigate(WhereNoParamsSent . .)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Unfortunately the whole formula gets a red line under it and says got two arguments expected three. 

Thanks @Doosan_Dean ,

Dangers of free-typing - was just missing some closing brackets - also fixed in original post to not confuse anyone looking at it.

If(
   !IsBlank(Param("AJID")),
   Set(varAJID, Value(Param("AJID")));
   Navigate([@ActivityCommentsScreenAJ]),
   !IsBlank(Param("KZID")),
   Set(varKZID, Value(Param("KZID")));
   Navigate([@ActivityCommentsScreenKZ]),
   Navigate(WhereNoParamsSent . .)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Hi @Doosan_Dean ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Unfortunately that still doesn't work, it's okay I appreciate your assistance.

Thanks @Doosan_Dean ,

What does not working?

Are there errors showing in the code or does it just not navigate?

If the latter, put two labels on the screen (you can remove them later) with varAJID and varKZID in the Text and see if they have values when the App is opened.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,587)