cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

Email Body Formatting

In my app I will be sending some emails.   The app is a request for Power Platform Premium licensing and the person requesting the licenses can submit a request for multiple people.   

 

If there is an initial approval to proceed, I need to send a single notification email to each distinct manager informing them of the request.   Many times a manager will have several employees that the license has been requested for and I want to display those employees in a list/table type format.

 

I currently have this which works beautifully:

 

 

ClearCollect(Proceed,
DropColumns(
AddColumns(

GroupBy(

Filter(AllRequests, varRecord.RequestNumber = RequestNumber),
"Approver", "ApproverEmail", "Submitter", "Result"),
"Employees",
Concat(Result, LicenseeName & " -- " & LicenseType & " --- " & "$" & TotalCost & Char(10))

),
"Result"
)

);

ForAll(Proceed,

Office365Outlook.SendEmailV2("Approver", "Premium Licensing Request", "<p>A request has been submitted by " & Submitter & " to obtain a Microsoft premium license for each of the following people. A premium license is necessary when the person needs to use a Power App or Power Automate flow that has premium features included.<br><br>" & Employees & "<br><br>Requests for quotes have been sent to our vendor and a quote will be provided to each individual employee listed here. It will be the responsibility of the employee to create an eReq to purchase the requested license. Information to be used in creating the eReq can be found here: <br><br>Until the eReq has been submitted and the license obtained, the employee will not be able to use the Power App or Flow that requires the license. If you have questions, please contact the individual who submitted the request.<br><br>Thank You</p>" )

)

 

 

It returns this email:

 

email.png

 

 

How can I have the line showing the employees in a list/table format rather than a single line?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@JR-BejeweledOne 

Please consider changing your Formula to the following:

ForAll(
    AddColumns(
        GroupBy(
            Filter(AllRequests, varRecord.RequestNumber = RequestNumber),
            "Approver", "ApproverEmail", "Submitter", "Result"
        ),
        "Employees", Concat(Result, LicenseeName & " -- " & LicenseType & " --- " & "$" & TotalCost & "<br>")
    ),
    
    Office365Outlook.SendEmailV2(
        Approver, 
        "Premium Licensing Request", 
        
        "<p>A request has been submitted by " & Submitter & " to obtain a Microsoft premium license for each of the following people. 
        A premium license is necessary when the person needs to use a Power App or Power Automate flow that has premium features included.<br><br>" & 
        Employees & 
        "<br><br>Requests for quotes have been sent to our vendor and a quote will be provided to each individual employee listed here. 
        It will be the responsibility of the employee to create an eReq to purchase the requested license. Information to be used in creating the 
        eReq can be found here: <br><br>
        Until the eReq has been submitted and the license obtained, the employee will not be able to use the Power App or Flow that requires the license. 
        If you have questions, please contact the individual who submitted the request.<br><br>Thank You</p>" 
    )

)

You really just needed a "<br>" in your concat, but also, no need for a heavy-weight collection for this purpose either.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

3 REPLIES 3
RandyHayes
Super User III
Super User III

@JR-BejeweledOne 

Please consider changing your Formula to the following:

ForAll(
    AddColumns(
        GroupBy(
            Filter(AllRequests, varRecord.RequestNumber = RequestNumber),
            "Approver", "ApproverEmail", "Submitter", "Result"
        ),
        "Employees", Concat(Result, LicenseeName & " -- " & LicenseType & " --- " & "$" & TotalCost & "<br>")
    ),
    
    Office365Outlook.SendEmailV2(
        Approver, 
        "Premium Licensing Request", 
        
        "<p>A request has been submitted by " & Submitter & " to obtain a Microsoft premium license for each of the following people. 
        A premium license is necessary when the person needs to use a Power App or Power Automate flow that has premium features included.<br><br>" & 
        Employees & 
        "<br><br>Requests for quotes have been sent to our vendor and a quote will be provided to each individual employee listed here. 
        It will be the responsibility of the employee to create an eReq to purchase the requested license. Information to be used in creating the 
        eReq can be found here: <br><br>
        Until the eReq has been submitted and the license obtained, the employee will not be able to use the Power App or Flow that requires the license. 
        If you have questions, please contact the individual who submitted the request.<br><br>Thank You</p>" 
    )

)

You really just needed a "<br>" in your concat, but also, no need for a heavy-weight collection for this purpose either.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

I thought about that as far as the <br> went but didn't think I could put that in the concat.



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
RandyHayes
Super User III
Super User III

@JR-BejeweledOne 

Yep...concat results in a string.  So you can put whatever you want in it string-wise.  Since you need a break in the email Html, that's the place to do it.

You could have also done this:

ForAll(
    GroupBy(
        Filter(AllRequests, varRecord.RequestNumber = RequestNumber),
        "Approver", "ApproverEmail", "Submitter", "Result"
    ),
    
    Office365Outlook.SendEmailV2(
        Approver, 
        "Premium Licensing Request", 
        
        "<p>A request has been submitted by " & Submitter & " to obtain a Microsoft premium license for each of the following people. 
        A premium license is necessary when the person needs to use a Power App or Power Automate flow that has premium features included.<br><br>" & 

        Concat(Result, LicenseeName & " -- " & LicenseType & " --- " & "$" & TotalCost & "<br>") & 

        "<br><br>Requests for quotes have been sent to our vendor and a quote will be provided to each individual employee listed here. 
        It will be the responsibility of the employee to create an eReq to purchase the requested license. Information to be used in creating the 
        eReq can be found here: <br><br>
        Until the eReq has been submitted and the license obtained, the employee will not be able to use the Power App or Flow that requires the license. 
        If you have questions, please contact the individual who submitted the request.<br><br>Thank You</p>" 
    )

)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (69,161)