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 Automate / Odata Filter on activi...
Power Automate
Answered

Odata Filter on activity entity??

(0) ShareShare
ReportReport
Posted on by 5

Hi, I am new to flow and am having a issue trying on a list record. 

 

On the filter I need to basically only pull records when they are either a Appointment or a Phonecall. Have spent so much time trying different formats but hit a dead end. 

 

Any assistance would be appreciated. 

 

Filter Query - activitytypecode eq Phone Call or activitytypecode eq Appointment   (Didnt Work)

 

I tried the above first but flow keeps erroring. 

 

Any suggestions on the fix?

 

 

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,294 Most Valuable Professional on at

    @Tsingh1 

    While I have very little experience with CDS, I suspect that you need single quotes around Phone Call and Approintment

    i.e. 'Phone Call'

  • Tsingh1 Profile Picture
    5 on at

    Hi @ScottShearer - thanks for the quick reply. 

     

    I already tried the single quotes - no luck unfortunately 

  • MJain Profile Picture
    2,450 on at

    Hi @Tsingh1 ,

     

    Use : activitytypecode eq '4210' or activitytypecode eq '4201'

    Please refer to the following url to get the correct values : 

    http://mscrmtechie.blogspot.com/2015/11/activity-pointer-and-activity-type-code.html

     

    Thanks

  • Verified answer
    v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @Tsingh1 ,

     

    Please try to configure Filter Query as follows:

    66.PNG65.PNG

    activitytypecode eq 'phonecall' or activitytypecode eq 'appointment'

     

    Hope this helps.

     

    Best Regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi - thanks for the reply. i have tried this and flow failed with below message: 

     

    There is an unterminated string literal at position 55 in 'activitytypecode eq '4210' or activitytypecode eq '4201'.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    thank you - this worked!. If i wanted to put in a criteria of appointments and phone calls only created in last 12 months what should I add?

  • MJain Profile Picture
    2,450 on at

    Hi @Anonymous ,

     

    Please add this : 

    Microsoft.Dynamics.CRM.LastFiscalYear(PropertyName='createdon') and (activitytypecode eq 'phonecall' or activitytypecode eq 'appointment') 

     

    Thanks

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey thanks for the quick reply. I tried that and now it shows no activity records at all?

  • MJain Profile Picture
    2,450 on at

    Hi @Anonymous ,

     

    The best way for you to find out if you have records created in last year is to go to advanced find and view all the activities based on your activity type and filter for your date parameter. If you see records over there it should definitely show up in flow as well.

     

    For more clarity please post your screenshot here.

     

    Thanks

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi thanks! 

     

    1 last query if I may. I am pulling through a createdon date but the format is US version of MM-DD-YYYY

     

    I want to change it to UK DD-MM-YY

     

    I cant figure out the expresssion i should use

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard