web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Deep Link not picking ...
Power Apps
Answered

Deep Link not picking up Last Submitted ID

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I am working on a Shipping App. When a new request is submitted, the Logistics Crew Members will be sent an email with a deep link that takes them to a Logistics screen where they will be able to view the request and process it. I'm having trouble passing the ID of the request as shown in the screenshot below. If someone could help me figure it out I would be grateful.

 

LOGISTICS SCREEN 

LogisticsScreenMissingID.png

 

APP ON START EDIT SCREEN DEEP LINK

I also have a deep link that goes into an email that is sent to the requestor if their request has been placed on hold until they provide more info. This deep link is working fine. Notice that I don't specifically call out a screen name in the deep link, just the ID.

Set(varProjectID,Value(Param("ProjectID")));
If(varProjectID <> 0,
Set(varRecord, LookUp('Domestic Shipping Requests', ID=varProjectID));
Navigate(frmSummary),Navigate(HomeScreen);

 

APP ON START LOGISTICS SCREEN DEEP LINK

Here I tried adding a specific reference to the screenname as well as the varProjectID to differentiate it from the Edit Screen deep link. This deep link does not work.

Set(varProjectID,Value(Param("ProjectID")));
If(Param("DeepLink") = "LogisticsScreen",
Set(varRecord, LookUp('Domestic Shipping Requests', ID=varProjectID));
Navigate(frmLogistics),Navigate(HomeScreen);

 

FRMMASTERNEW ONSUCCESS EMAIL FORMULA

This email is going through quickly when a new request is submitted, but the deep link isn't working. The page opens in Power Apps, but there is no ID (the url details are normally in the url of course).  Since this is a brand new request, do I need to reference "LastSubmit" somehow? If so, how do I incorporate it? 

//Marks the last step of the progress indicator complete
Patch(
 FormPageStatus,
 {Page: CurrentPage.Page},
 {Status: "Complete"}
);

//Sets a custom 5-digit ID based on the internal Sharepoint ID
UpdateIf(
 'Domestic Shipping Requests',
 ID = Self.LastSubmit.ID,
 {'Request Number': Self.LastSubmit.ID + 10000}
);

//Highlights the most recent record for the user
Set(
 HighlightRecord,
 frmMasterNew.LastSubmit
);

//Takes the user back to the homescreen
Navigate(HomeScreen,ScreenTransition.None);

//Sends an email notification to the Logistics Team
Office365Outlook.SendEmailV2("teresa.agustin@company.com",
 "New Shipping Request Notification",
 "<p>Hello,</p>
<p>A new Shipping Request has been submitted.</p>
<p><a href='https://apps.powerapps.com/play/urldetails&hidenavbar=true&DeepLink=LogisticsScreen&ProjectID="& varRecord.ID &"'>CLICK HERE</a> to view and process the shipping request.</p><p>Thank you</p>"
, {Bcc:varUser.Email,Importance:"High"})

 

Let me know if you need any additional information. Thank you, Teresa

Categories:
  • WarrenBelz Profile Picture
    156,576 Most Valuable Professional on at

    Hi @tagustin2020 ,

    Regarding your deep link, you need to navigate to the screen, not the form - also try this structure

    If(
     !IsBlank(Param("ProjectID")),
     Set(
     varProjectID,
    	 Value(Param("ProjectID")
     );
     If(
     !IsBlank(Param("LogisticsScreen")),
     If(
     Param("DeepLink") = "LogisticsScreen",
     Navigate(YourLogisticsScreenName)
     ),
     Navigate(HomeScreen);
     ),
     Navigate(HomeScreen)
    )

    and the Item of the Form

    LookUp(
     'Domestic Shipping Requests', 
     ID=varProjectID
    )

    If the form is selected from a Gallery (not the deep link) - gallery OnSelect

    Set(varProjectID, ThisItem.ID)

     

    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.

  • tagustin2020 Profile Picture
    on at

    @WarrenBelz 

     

    Hi Warren,

     

    Thanks for the reply. As noted in my original screenshots, I also have a variable called varRecord. When I try adding the formulas suggested above, a lot of other formulas in the app break. Obviously, no fault of yours, just letting you know. I'll try replacing all of my varProjectID references with varRecord since there are far fewer varProjectID references in the app than varRecord ones.

     

    In regards to navigating to a screen versus a form, I tried that originally as it is what makes the most sense, but my deep links only ever went to the home screen. I'll try again with the new OnStart formula structure you suggest to see if that makes a difference. I've been working on my app for many hours today so I'll start fresh on this tomorrow and let you know how it works out. Thanks again for jumping in to help!

     

    Have a good day,

    Teresa

  • Verified answer
    WarrenBelz Profile Picture
    156,576 Most Valuable Professional on at

    Hi @tagustin2020 ,

    If you need to stick with varRecord, try the below (and yes, you have to navigate to a screen)

     

    If(
     !IsBlank(Param("ProjectID")),
     Set(
     varProjectID,
     Value(Param("ProjectID")
     );
     Set(
     varRecord,
     LookUp(
     'Domestic Shipping Requests', 
     ID=varProjectID
     )
     ), 
     If(
     !IsBlank(Param("DeepLink")),
     If(
     Param("DeepLink") = "LogisticsScreen",
     Navigate(YourLogisticsScreenName)
     ),
     Navigate(HomeScreen);
     ),
     Navigate(HomeScreen)
    )

     

    Incidentally I use the direct LookUp in the Form as it refreshes immediately, whereas varRecord needs to be refreshed to show the new data.

     

    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.

  • tagustin2020 Profile Picture
    on at

    @WarrenBelz 

     

    Hello Warren,

     

    Thank you very much for this suggestion. Today was like a Monday as it was the first day back in the office after the American Fourth of July weekend so I didn't get a chance to work on the app. I should be able to give this a try tomorrow morning and let you know how it turned out. I really appreciate your support.

     

    Kind regards,

    Teresa

  • WarrenBelz Profile Picture
    156,576 Most Valuable Professional on at

    Thanks Theresa @tagustin2020 ,

    I keep forgetting time zones (Wednesday midday here)

  • tagustin2020 Profile Picture
    on at

    @WarrenBelz 

     

    Hi Warren,

     

    I'm getting an error stating "invalid number of arguments: received 4, expected 2." Can you please advise on how best to adjust the formula? Thank you, Teresa

     

    InvalidArguments.png

  • WarrenBelz Profile Picture
    156,576 Most Valuable Professional on at

    Hi @tagustin2020 ,

    As usual with free-typed code, there is one missing bracket - see if you can spot it (fairly obvious)

  • tagustin2020 Profile Picture
    on at

    @WarrenBelz 

     

    Hi Warren,

     

    I found the missing bracket, but I'm still having no success getting to the right screens and now my brand colors have disappeared as well. This is what happens when I receive an email with the deep link to the Logistics screen. I know it is difficult to see, but there should be an ID at the end of the string which is why I highlighted it. It is blank. This is the home screen, not the logistics screen.LogisticsDeepLinkSS.png

     

    Here is my App OnStart formula. I've tried putting your formula suggest both above the other 2 deep links and below them. Can you help me figure out what I am doing wrong? The other two deep links were working fine over multiple tests and now they aren't working either. Everything just takes me to the home screen of the app.

     

    If(
     !IsBlank(Param("ProjectID")),
     Set(
     varProjectID,
     Value(Param("ProjectID")
     ));
     Set(
     varRecord,
     LookUp(
     'Domestic Shipping Requests', 
     ID=varProjectID
     )
     ), 
     If(
     !IsBlank(Param("DeepLink")),
     If(
     Param("DeepLink") = "LogisticsScreen",
     Navigate(LogisticsScreen)
     ),
     Navigate(HomeScreen);
     ),
     Navigate(HomeScreen)
    );
    //Deep Link to New Request Form
    If(Param("DeepLink") = "RequestorScreen",
    Set(varRecord, Defaults('Domestic Shipping Requests'));ResetForm(frmMasterNew);
    Navigate(RequestorScreen),Navigate(HomeScreen));
    //Deep Link to Edit Form
    Set(varProjectID,Value(Param("ProjectID")));
    If(varProjectID <> 0,
    Set(varRecord, LookUp('Domestic Shipping Requests', ID=varProjectID));
    Navigate(EditScreen),Navigate(HomeScreen);
    Concurrent(
     Set(
     varUser,
     User()
     ),
     Set(
     varColors,
     {
     TealDark: RGBA(
     0,
     98,
     129,
     1
     ),
     TealBright: RGBA(
     28,
     181,
     216,
     1
     ),
     TealLight: RGBA(
     64,
     205,
     227,
     .5
     ),
     GrayCharcoal: RGBA(
     62,
     67,
     74,
     1
     ),
     GrayMedium: RGBA(
     215,
     215,
     215,
     1
     ),
     GrayLight: RGBA(
     245,
     245,
     245,
     1
     )
     }
     ),
     ClearCollect(StatusColors, {
     Status:"Not started",
     Fill: RGBA(215, 215, 215, 1),
     Color: RGBA(255, 255, 255, 1)
    }, {
     Status:"In progress",
     Fill: RGBA(28, 181, 216, 1),
     Color: RGBA(255, 255, 255, 1)
    }, {
     Status:"Complete",
     Fill: RGBA(115, 191, 68, 1),
     Color: RGBA(255, 255, 255, 1)
    })));

     

    There are no error messages in the app, but nothings working...

     

    Teresa 

  • WarrenBelz Profile Picture
    156,576 Most Valuable Professional on at

    @tagustin2020 ,

    Can you please use Format Text on that and re-post. Also a bit of explanation what is not working. You also need to "build" code like that in stages - get it working and add bits, testing each time.

  • tagustin2020 Profile Picture
    on at

    @WarrenBelz 

     

    Hi Warren,

     

    I'm not sure what you mean by format text. Can you explain? All of the formulas were working fine before we introduced the new piece for the Logistics screen. Not sure how/why the new formula impacted what I already had in the app.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard