SOLVED

power platform question

Brass Contributor

Hi , how to create a powerapp that have capability search a list record  , allow to download the result as pdf and capability to send the result to email when user enter his/her email ? 

2 Replies
best response confirmed by Bd2023-b (Brass Contributor)
Solution

@Bd2023-b you can either do this via a flow in Power Automate or, alternatively, directly from the canvas app using the PDF function and the Office365 Outlook connector. Reza Dorrani has a very good video on this at https://www.youtube.com/watch?v=sK3WsjQiqcQ and it's this video that I used as the basis for the Email PDF button on my detail gallery in the bottom right from the airport selected in the gallery on the left:

1-ISO-Airports-Database.png

 

 

1a-ISO-Airports-Database.png

 

The app's OnStart function loads a collection from the SharePoint list. The gallery on the left can  then be filtered down using one of the search boxes using the formula 

If(inpAirport.Text="", SortByColumns(Filter(colAirports,StartsWith(Country, inpCountry.Text)),"Title",SortOrder.Ascending), SortByColumns(Filter(colAirports,StartsWith(Title, inpAirport.Text)),"Title",SortOrder.Ascending))

The app doesn't need the user to enter their email address as it knows who the current logged in user is. The formula for the Email PDF button OnSelect is 

Office365Outlook.SendEmailV2(User().Email,"Airport Details", "Details from ISO Airports Database",{Attachments:Table({Name:"Airport.pdf",ContentBytes:PDF(galDetail,{Orientation:PaperOrientation.Portrait,Size:PaperSize.A4})})})

 

Come back with any questions about how this was built.

  

Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

@Rob_Elliott - Any way to share your code through Git hub or a doc ? I will follow it . Thanks again for guiding and helping.