cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Community Champion
Community Champion

Re: Email Link takes the user to a specific screen

Hi @BB9 ,

Just got your last message - that is precisely what I do and it is not difficult.

The key is the common selection method of the required record on the screen containing this form. As you are sending the ID in the URL, this is done as per the specs below. Strangely, I actually have the same screen name as you and a different Reference.

So firstly at App OnStart

If(
   !IsBlank(Param("ItemID")),
   Set(
         vID,
         Value(
            Param("ItemID")
         )
      );             
      Navigate(DisplayScreen,ScreenTransition.Cover),   //This has the target record on it
      Navigate(YourGalleryScreen,ScreenTransition.Cover); //This has a gallery of records on it    
   )
)

This will put the ID number you want into the numeric variable vID and navigate straight to the DisplayScreen (or to the gallery screen if there in no ItemID parameter in the URL that opened the app).

Now the Item of the form displaying the record can be

LookUp(MyListName,ID=vID)

and lastly, on the OnSelect of your gallery that normally selects the item

Set(vID,ThisItem.ID);
Navigate(DisplayScreen,Fade)

So it will also display the required record by the same means.

Happy to elaborate further if required.

 

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.

 

View solution in original post

Highlighted
Helper II
Helper II

Re: Email Link takes the user to a specific screen

Thank you @WarrenBelz for the additional information. That's exactly how I had. I went ahead and replaced my code with your snipper but it still works only while on the App. When I am clicking on the URL, it is taking them to the filterpage. I have added labels to see if the vID from the URL is getting set to vID. It is showing up as blank on both screens.

Highlighted
Community Champion
Community Champion

Re: Email Link takes the user to a specific screen

Hi @BB9 ,

What is your Launch URL? - I think the issue is there?

Highlighted
Community Champion
Community Champion

Re: Email Link takes the user to a specific screen

Hi @BB9 ,

You have blanked most of it out, but by the length of it, you have the ?tenantid bit in as well. If so (you don't actually need this), the bit before ItemID should be &ItemID= . . .

Highlighted
Helper II
Helper II

Re: Email Link takes the user to a specific screen

https://apps.powerapps.com/play/*******************?tenantId=**********&ItemID=29 - This is the link from the email generated by Microsoft Flow.

 

I also has a welcome screen with two buttons - one directly takes them to the filter page, one will let them create a new item.

 

On App Start, previously, I set it to the Welcome Screen, but I have replaced it with the code similar to yours at least to get this email link to work. Now my App Start - Looks like:

Collection1, Collecton2 --- Collection5; 

If(
!IsBlank(Param("RecordID")),
Set(
vID,
Value(
Param("RecordID")
)
);
Navigate(DisplayScreen,ScreenTransition.Cover), //This has the target record on it
Navigate(FilterPage,ScreenTransition.Cover); //This has a gallery of records on it
)
 
When I run the app normally, my URL will look like this:

 

Highlighted
Community Champion
Community Champion

Re: Email Link takes the user to a specific screen

Hi @BB9 ,

As per my last amended post, you need to refer to your parameter name

 

If(
   !IsBlank(
      Param("ItemID")
   ),
   Set(
      vID,
      Value(
         Param("ItemID")
      )
    );
   Navigate(DisplayScreen,ScreenTransition.Cover), //This has the target record on it
   Navigate(FilterPage,ScreenTransition.Cover); //This has a gallery of records on it
)

 

 

Highlighted
Helper II
Helper II

Re: Email Link takes the user to a specific screen

Ugghhh, how did I make this silly mistake. I changed my variables to your variables and forgot to update my variable name in Flow. Looks like it is working now. Thank you so much for your help.

 

I had similar logic before but for some reason I am still not able to figure out what I did wrong before, but after I changed it similar to yours, it is working perfectly. Although this looks simple, I spent quite some time changing the logics/galleries etc. Thanks again.

 

One more question (irrelavant to this post though):

I have two use cases. One user directly using the App. Second users coming through the email link.

Now that we have changed the On Start navigate screen, every time I open the app it takes them directly to the Filter screen. Is there a way to have a conditional logic to have the welcome screeen loading when the user open the app and take them to the display screen when they click the link?

Highlighted
Community Champion
Community Champion

Re: Email Link takes the user to a specific screen

Hi @BB9 ,

You can have more than one parameter in one link, or a different parameter in the other email link.

So if you had in the other Link .......&welcome=1, you would test for Param("welcome") - you can set it to whatever your want (1 is an example), but if it was not blank - you could have something like

If(
   !IsBlank(
      Param("ItemID")
   ),
   Set(
      vID,
      Value(
         Param("ItemID")
      )
    );
   Navigate(DisplayScreen,ScreenTransition.Cover),
   If(
   !IsBlank(
      Param("Welcome")
   ),
   Navigate(WelcomeScreen,ScreenTransition.Cover),
   Navigate(FilterPage,ScreenTransition.Cover)
)

 

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,718)