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 Apps
Unanswered

Multiple filters

(0) ShareShare
ReportReport
Posted on by 16

If(IsBlank(DatePicker1.SelectedDate) && IsBlank(Dropdown1.SelectedText),
   SortByColumns(
       Search(
           Call_History_DB,
           'search all'.Text,
           "Title",
           "FSE",
           "SYSTEM_",
           "AgentName",
           "AgentID",
"Comments"
       ),
       "Created",
       Descending
   ),
   SortByColumns(
       Filter(
           Search(
               Call_History_DB,
               'search all'.Text,
               "Title",
               "FSE",
               "SYSTEM_",
               "AgentName",
               "AgentID",
"Comments"
           ),
           DateValue(Created) = DatePicker1.SelectedDate, "Agent Name" = Dropdown1.SelectedText), // I have tired multiple combinations ie text(Agent Name),  Dropdown1.selected.value, Dropdown.selected
       "Created",
       Descending
   )
)

 

The code works fine without the dropdown filter, it uses a date picker to filter the date. Ive ran it through chatgpt multiple times too and there are always errors, it says cant compare text and a record. The Agent Name is a column on a sharepoint list containing names of who created a record and what I need is to be able to filter specific dates and then a certain agent on that date. Any ideas? (Agent Name is the actual SP list column name but it picks it up as AgentName in the search and filter, i have tried inputting it in like this too and no luck)

image.png
Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @lakka00 

    You will need to sort out the actual column for the Agent name.  Try putting the dot after Dropdown1.Selected and see what intellisence comes up with that looks promising.  What is the Items property of your dropdown and what type of column is "Agent Name"?

     

     

    With({_items:Sort(
     Search(Call_History_DB,'search all'.Text, "Title","FSE","SYSTEM_","AgentName", "AgentID","Comments"), 
     Created, Descending),
     },
     Filter(
     _items,IsBlank(DateValue(Created))||DateValue(Created) = DatePicker1.SelectedDate,
     'AgentName' = Dropdown1.Selected.AgentName
     )
    )

     

     

     

     

     

     

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

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard