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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Need to filter CDS gal...
Power Apps
Unanswered

Need to filter CDS gallery by view with additional conditions

(0) ShareShare
ReportReport
Posted on by 57

Because I couldn't add these conditions into view in CRM (which requires to check today's date is between 2 date fields in Opportunity record), I would like to add them in PowerApp formula but somehow I can't get them to work:

 

SortByColumns(Search(Filter(Opportunities,'Opportunities (Views)'.'My Open Opportunities','Program Pre-Start Date' <= Today(),'Program Post-Start Date' >= Today()), OppoTextSearchBox.Text, "name"), "estimatedclosedate", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

 

'Program Pre-Start Date' and 'Program Post-Start Date' are fields in Opportunity record and I would like to filter to show only Opportunity records if today is between these 2 days.

 

Please help!!

I have the same question (0)
  • PowerBack19 Profile Picture
    679 on at
    Re: Need to filter CDS gallery by view with additional conditions

    @jade7669 It looks like you might of the greater than and less than backwards. Shouldn't "Today" be greater than (or equal to) the Start Date and less than (or equal to) the End Date?

  • Jessica Tse Profile Picture
    57 on at
    Re: Need to filter CDS gallery by view with additional conditions

    My goal is to show the records when today is between the pre-start date and post-start date, and therefore the logic was like so.  However, the error I am facing doesn't seem to be related to the condition (please see attached images x 2).  No matter how I set the condition (greater than or less than), error message 'The specified record was not found. Server Response: UserId is empty guid!' - but I don't have UserId in my app and I don't know why it's referenced.  Whenever I removed the part 'Program Pre-Start Date' <= Today(), this error message goes away...  How should I setup the formula so the filter knows to compare the dates to begin with?  Please advise!!

  • Mauko Profile Picture
    2 on at
    Re: Need to filter CDS gallery by view with additional conditions

    I'm facing similar issue.  Did you ever find a solution to this?

  • Jessica Tse Profile Picture
    57 on at
    Re: Need to filter CDS gallery by view with additional conditions

    No I didn't.  This is still not resolved.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 308 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 222 Super User 2025 Season 2

Last 30 days Overall leaderboard