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

Send an email with a hyperlink to browsescreen

Hello community,

 

please help me. I've attempted to recreate a deep linking reference: https://powerapps.microsoft.com/en-us/blog/powerapps-deep-linking/,   in order to provide a direct link to the forms on a email notification. However, I am getting errors on the powerapps formula -for the formula used on the home screen: "Name isn't valid. This identifier is recognized" and error "Invalid use of '.' on the NewScreen.

 

So i've followed the article to replicate this URL link on an email and created a timer on the home screen. 

 

set the property of OnTimerEnd: If(Not(IsBlank(Param("machineId"))),Navigate(NewScreen,ScreenTransition.Cover,{devices:LookUp(Machines, MachineID = Value(Param("machineId")))}))

 

On the newscreen, OnSelect of the Submitton Button: Office365Outlook.SendEmail("email here", "Test", "https://web.powerapps.com/apps/c1944cc6-1a04-4d73-bf24-564e70cc279e?machineId=" & Devices.MachineID)

 

Timer button home screen.pngSubmit Button new screen.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @mthiru ,

Do you want to send an email to a specific user when you submit a new record through the Edit form successfully?

Do you add a "Machines" data source within your app? Could you please share a bit more about data source used in your app?

 

Based on the formula that you mentioned, I think there is something wrong with it. I assume that you want to send an email along with the App URL to a specific user when you submit a new record through the Edit form successfully, is it true?

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnStart property of the App to following:

Set(UserIDValue, Param("userID"));
If(
    !IsBlank(UserIDValue),
    Navigate(NewScreen,ScreenTransition.Cover);EditForm(NewForm1)
)

 

Within the Edit screen, add a Edit form, set the Item property of the Edit form to following:

If(
   !IsBlank(UserIDValue),
   LookUp('User Data Source', UserId = UserIDValue)
)

Set the OnSelect property of the "Submit" button to following:

SubmitForm(NewForm1)

Set the OnSuccess property of the Edit form to following:

Office365Outlook.SendEmail(
                            "email here", 
                            "Test", 
                            "https://web.powerapps.com/apps/c1944cc6-1a04-4d73-bf24-564e70cc279e?userID=" &  NewForm1.LastSubmit.UserId
)

Note: I assume that there is a "UserId" column in your Users data source, which could identify one record in your data source uniquely.

 

Please check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Editing-a-record-from-a-flow-powerapp/m-p/26...

https://powerusers.microsoft.com/t5/Building-Power-Apps/Embedded-link-to-a-Sharepoint-List-item-in-P...

 

Best regards,

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

2 REPLIES 2
Super User III
Super User III

Hi @mthiru ,
I do a bit of both deep linking and generated links (but not timer stuff), so I will have a go at helping you. Firstly, this bit

Office365Outlook.SendEmail(
   "email here", 
   "Test", 
   "https://web.powerapps.com/apps/c1944cc6-1a04-4d73-bf24-564e70cc279e?machineId=" & 
   Devices.MachineID
)

seems valid as far as the syntax goes -so your reference to Devices.MachineID

 If(
   Not(
      IsBlank(Param("machineId"))
   ),
   Navigate(
      NewScreen,
      ScreenTransition.Cover,
      {
         devices:
         LookUp(
            Machines, 
            MachineID = Value(Param("machineId"))
         )
      }
   )
)

I parsed it all so it made better sense to me and what you appear to be wanting to do is pass a value from a Lookup on the parameter passed (which is text) referencing another value in a table. You are also opening a screen passing some parameters.
Without looking too far into all of this, may I suggest we explore the following:
Set a Global Variable with the incoming parameter

If(
   !isBlank(
      Param(machineId)
   ),
   Set(
      vMachID, 
      LookUp(
         Machines, 
         MachineID = Value(Param("machineId"))
      )
   )
)
      

then send this to the email (I have added a masked link for better presentation)

Office365Outlook.SendEmail(
   "email here", 
   "Test", 
   "<a href='" & 
   "https://web.powerapps.com/apps/c1944cc6-1a04-4d73-bf24-564e70cc279e?machineId=" & 
   vMachID & "'>Link Here</a>"
)

I would appreciate your thoughts.

 

 

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.

Community Support
Community Support

Hi @mthiru ,

Do you want to send an email to a specific user when you submit a new record through the Edit form successfully?

Do you add a "Machines" data source within your app? Could you please share a bit more about data source used in your app?

 

Based on the formula that you mentioned, I think there is something wrong with it. I assume that you want to send an email along with the App URL to a specific user when you submit a new record through the Edit form successfully, is it true?

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnStart property of the App to following:

Set(UserIDValue, Param("userID"));
If(
    !IsBlank(UserIDValue),
    Navigate(NewScreen,ScreenTransition.Cover);EditForm(NewForm1)
)

 

Within the Edit screen, add a Edit form, set the Item property of the Edit form to following:

If(
   !IsBlank(UserIDValue),
   LookUp('User Data Source', UserId = UserIDValue)
)

Set the OnSelect property of the "Submit" button to following:

SubmitForm(NewForm1)

Set the OnSuccess property of the Edit form to following:

Office365Outlook.SendEmail(
                            "email here", 
                            "Test", 
                            "https://web.powerapps.com/apps/c1944cc6-1a04-4d73-bf24-564e70cc279e?userID=" &  NewForm1.LastSubmit.UserId
)

Note: I assume that there is a "UserId" column in your Users data source, which could identify one record in your data source uniquely.

 

Please check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Editing-a-record-from-a-flow-powerapp/m-p/26...

https://powerusers.microsoft.com/t5/Building-Power-Apps/Embedded-link-to-a-Sharepoint-List-item-in-P...

 

Best regards,

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

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (65,952)