web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Activities base...
Power Apps
Unanswered

Filter Activities based Activity Type

(0) ShareShare
ReportReport
Posted on by 24

Hi all experts,

I would like to filter Activities based on Activity Type using Canvas App Gallery. I tried but I cannot get the Activity Type Optionset in the Canvas App when I try to filter. Is there any solution or suggestion to filter Activity based on Activity Type?

 

thanks in advance

Categories:
I have the same question (1)
  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @Necdet ,

     

    Hopefully you can find your scenario in this guide how to filter a Dataverse Choice column: https://www.d365geek.co.uk/single-post/filtering-by-choice-columns-in-dataverse-and-power-apps-what-are-my-choices

  • necsa Profile Picture
    24 on at

    Thanks for the rapid answer. This page and information are known did you try it? Is it working with Activities? The Activity Type is Global Choice and  I didn't find a solution to filter it. Please if you try and get any solution I'll be thankful when you share here. Thanks in advance.

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @Necdet ,

     

    I did a quick test using a combobox using the Activities table for the Items property and a gallery with the below formula for its' Items property which seems to work as expected:

    Filter(Donations, Activity in ComboBox1.SelectedItems.Activity)

     

    BCBuizer_0-1703017248312.png

     

  • necsa Profile Picture
    24 on at

    Hi @BCBuizer ,

    I appreciate your time and answer. But this is only the value of the activity id. I mean activity type. When I filter activities I want to get separate with activity types like "Email", "Appointment", "tasks" or "Phonecall". Can you define with this ID what type of activity are you handling?

  • rodrigopuravida Profile Picture
    12 on at

    Hi,

    Were you able to solve your issue?  I came across the same thing !!!

    Thanks in advance

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @rodrigopuravida , @Necdet ,

     

    Have you tried using the Choices function to access the optionset: https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-choices

     

    This should return the optionset values as well as the ids.

  • rodrigopuravida Profile Picture
    12 on at

    Hi,

    To make a long story short this is what I did to work around this issue:

    1. on the Items property added a column (AddColumns with name e.g. ActivityTypeAdded) with the Activities table as datasource, the new column name and then the following as third argument so based on the record it will populate the new column with that value as text.  
    2. Once that is in place I can filter on the new column and can forget about the 'non appearing' activity type table.  If I could see the column ActivityType this would have been way easier but I can't so had to make it work.

    Sort of looks like this

    Filter(
            AddColumns(
                Filter(
                    Activities,
                    Regarding = [@ModelDrivenFormIntegration].Item,
                    Or(
                        'Activity Status' = 'Activity Status (Activities)'.Completed,
                        'Activity Status' = 'Activity Status (Activities)'.Canceled
                    ) && ('Activity Status' = drp_ActivityStatus.Selected.Value || drp_ActivityStatus.Selected.Value = Blank())
                ),
                "ActivityTypeAdded",
                If(
                    IsType(
                        ThisRecord,
                        [@'Email Messages']
                    ),
                    "Email Message",
                    IsType(
                        ThisRecord,
                        [@'Phone Calls']
                    ),
                    "Phone Calls",
                    IsType(
                        ThisRecord,
                        [@Letters]
                    ),
                    "Letter",
                    IsType(
                        ThisRecord,
                        [@Faxes]
                    ),
                    "Fax",
                    IsType(
                        ThisRecord,
                        [@Appointments]
                    ),
                    "Appointment",
                    IsType(
                        ThisRecord,
                        [@'QC Phone Calls']
                    ),
                    "QC Phone Call",
                    "No Entity Found"
                )
            ),
            ActivityTypeAdded = drp_ActivityType.SelectedText.Value || drp_ActivityType.SelectedText.Value = Blank()
        )
     
     
  • rodrigopuravida Profile Picture
    12 on at

    oh and thank you for your feedback btw.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard