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)

Report
All responses (
Answers (