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 / Send email with url wi...
Power Apps
Answered

Send email with url with filtered data

(0) ShareShare
ReportReport
Posted on by 83

Hello, I have a power apps where users can register to various training programmes. 

 

We have three administrators that organise 3 different types of trainings.

 

What I want to do is the administrator to be able to send the url to the users which will show the training category that they administrate.

 

This is the training app

 

anna2109_0-1678807802656.png

When the user clicks on the select the following gallery is opened:

 

anna2109_1-1678807924621.png

 

What I want to happen is the administrator to send the url with filtered data based on the dropdown of the first image. So instead of user to select the event category from the dropdown list, I want to send the url with filtering the data by the event category.

 

Many Thanks for your help

Categories:
I have the same question (0)
  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    You can build the URL with the necessary parameters (deep link) and get them via the Param function, in order to be able to show the correct content to the user.
    You might want to send the ID of each parameter instead of text so the URL doesn't get too long.
    How do you intend to send the email? Through Power Apps/Automate or via mailto directly through the desktop client (Outlook, etc.)?

  • anna2109 Profile Picture
    83 on at

    I want the emails to be sent via the power apps.

  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    Then you need to connect Outlook in your app. From there, assemble the URL of the app. I made an example:

     

    With(
     {
     _appLink: "https://apps.powerapps.com/play/e/",// insert App ID and Tenand ID
     _categoryID: 1,
     _eventID: 10
     },
     With(
     {_url: $"{_appLink}&CategoryID={_categoryID}&EventID={_eventID}"},
     Office365Outlook.SendEmailV2(
     User().Email,
     "Hi, here is your link",
     $"<a href='{_url}'>Click here</a>"
     )
     )
    )

     

    From there use the Param function to retrieve information from the URL.

  • anna2109 Profile Picture
    83 on at

    Hello @LuizVicente ,

     

    thank you for your reply. Apologies but I am not quite sure if I have understood your solution. It might worth giving some more details.

    So I have an administrator screen where the user can set up a new session selecting from the dropdown list of the event category among the three options.

     

    anna2109_0-1679389539361.png

     

    On select of the green button I have the following code:

     

    anna2109_2-1679389957610.png

     

    After the schedule of the meeting, the administrator will notify the department that a new training is coming up.

    So when the users open the app the first screen they view is the following:

     

    anna2109_3-1679390151496.png

    so the user should go and select from the dropdown list the event category in order the gallery to display only the items based on the selection made in the dropdown list. What we want to happen is the administrator to send a link to the users where this link will have preloaded data. So if for example the administrator organised a CPD session then the link should show as preloaded data the items that have as event category the CPD and afterwards if the user wants to view what else there is as upcoming training session under another category to open the dropdown list and select another category.

     

    On the items of the dropdown list I have the following:

    anna2109_4-1679390620389.png

     

    and on the gallery I have the following code:

     

    anna2109_5-1679390672708.png

     

    I hope now it is more clear. Apologies if I am asking to much from you, as I am newbie in power apps. I have watched tutorials on youtube for deep linking when this involves galleries and forms, it worked when I tested but I could find anything in particular when we have a dropdown list as well.

     

    Many Thanks.

     

  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    You can send the data selected by the admin in the URL parameters, but either way, the filter logic has to be in the gallery and in the Dropdown. For this control, you can put a formula in the Default property, which checks the URL parameters and selects accordingly. For example:

     

    powerapps url param.gif

     

    Dropdown.Default:

    If(
     !IsBlank(Param("select")),
     Param("select")
    )
  • anna2109 Profile Picture
    83 on at

    Hi @LuizVicente ,

     

    I appreciate the time that you have put to reply to my post unfortunately I can't get it work...


    So I have set up the Default properties of the dropdown list using the following code.

    If(
     !IsBlank(Param("select")),
     Param("select")
    )

     and then I tried to test getting the web link of the app adding at the end &select=CPD  however when I opened the url it didn't display only the CPD sessions and the dropdown list did show all the events:

     

    anna2109_0-1679411001632.png

    Apart from the default value of the dropdown list , do I need to add anything else on the items of the gallery?

     

    Sort(
    Filter(
    Event_List,
    (EventStatus="Active") && (drp_eventcategory.Selected.Result="All" || EventCategory=drp_eventcategory.Selected.Result))
    ,StartDate
    ,SortOrder.Descending)

     

    Many Thanks and apologies for asking you for more details.

     

     

  • Verified answer
    LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    No problem.
    Any chance the URL is incorrect? It has to be in this format: https://apps.powerapps.com/play/{App ID}?select=CPD

    For the filter, my question is here: EventCategory=drp_eventcategory.Selected.Result.
    Why "Result"? Is it the collection column name?

    And then we can already add something else: how are you creating the collection that serves as the source for the dropdown?

  • Verified answer
    anna2109 Profile Picture
    83 on at

    Hi @LuizVicente 

    I have tried the url as https://apps.powerapps.com/play/{App ID}?select=CPD however it opened the page with all the trainings and not only the CPD.

     

    The event category dropdown on the items has collectevent.

    This collection was created as below:

    ClearCollect(collectevent,{Result: "All"});
    Collect(collectevent, ForAll(Distinct(Event_Type,EventType),{Result: ThisRecord.Value})). The reason I created the collection was because I wanted to add on the dropdown list the All as an option. Therefore, when the user selects All the gallery will display all the items.

     

    It seems that is not working when the dropdown list is with collection. 

     

    Because when I changed the dropdown list with the following:

    Distinct(Sort(Event_Type,EventType),EventType).

     

    After this change, the url it worked properly.

     

    Thank you very much for your help.

  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    Cool. So have you found a solution?
    You can mark your own answer as a solution, so others can find it faster.

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 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard