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 / Office365Outlook chang...
Power Apps
Answered

Office365Outlook changing href link in email body

(0) ShareShare
ReportReport
Posted on by 11

Hello, I am facing a strange issue with href links within the body of emails that are generated through a power app visual within my power bi report.  

 

The Power BI report itself is fairly simple, it has a landing page, a page for KRI-type information, and a page that has a power app visual that allows users to create/maintain items in the dataset.  When a user submits a new item, power apps sends an email to the user acknowledging receipt of said entry.  Within the email is a link that is set up to open the power bi report, navigate to the power app visual page, and preload ViewForm with the proper ID.  

Here is the code I use to generate the email:

Set(varAppLink,
"https://app.powerbi.com/mypowerbireport?experience=power-bi&filter=Personalization/ReportPage eq 'scrViewEntry' and Report_Data/Entry_ID eq '" & varNewEntryID & "'");

Set(varEmailContents,
"A new entry has been submitted through the Power BI Intake application and is awaiting an approval decision. " &
"Please click on the <a href='" & varAppLink & "'> LINK </a> to open the Intake Application." & "<br><br>" & "<table border=1>" &
"<tr><td>Intake ID</td><td>" & varNewEntryID & "</td></tr>" &
"</td></tr></table>" & "<br><br>" &
"This email and its attachments are confidential. Any unauthorized use or disclosure is prohibited. If you receive this email in error, please notify " & "me by reply email and permanently delete the original without making any copies or disclosing its contents.");

Set(varEmailTo, "me");
Set(varEmailSubject, "New Intake Submitted");

Office365Outlook.SendEmailV2(varEmailTo, varEmailSubject, varEmailContents);

This code generates the email just fine, however, when you click the link within the email, it launches the power bi report and does not pass the parameters.  Hovering over the link hyperlink within the email, I can see the following url:

"https://app.powerbi.com/mypowerbireport?experience=power-bi&filter=Personalization%2FReportPage%20eq"


Somehow, some component in the email creation or delivery is truncating the url link at the first instance of ' within the string.  I can manually type in the correct url address bar to get the report to open to ViewEntry page and have it display the correct entry information, so I know the report is set up to correctly pass the parameters through to the power app visual.  My issue is that somehow, somewhere along the line the syntax for the report parameters are being stripped off the url.  

Does anyone know how I can get around this?

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    issue resolved below

  • Verified answer
    dfranczyk_ Profile Picture
    11 on at

    Ok, it turns out I was looking at the wrong issue.  
    Spaces are not allowed within the url value of the href attribute.

     

    To resolve the issue, I ended up adjusting my AppLink variable to the following:
    Set(varAppLink,
    "https://app.powerbi.com/mypowerbireport?experience=power-bi&filter=Personalization/ReportPage%20eq%27scrViewEntry%27%20and%20Report_Data/Entry_ID%20eq%20%27" & varNewEntryID & "%27");

    To be clear, apostraphe characters are allowed within the url syntax, I tested it both ways and it worked, but I wanted to be safe and covered the bases for my own piece of mind.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard