Forum Discussion

Bd2023-b's avatar
Bd2023-b
Brass Contributor
Aug 27, 2023

power platform question

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 ? 
  • Rob_Elliott's avatar
    Aug 27, 2023

    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:

     

     

     

    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)

Resources