cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Delegation Help

in need your Help 

my code is not working 

Macbek_0-1633611242802.png


Somehow I can't get the 2 comboboxes to filter Task and Agent.

10 REPLIES 10
StalinPonnusamy
Super User
Super User

Hi @Anonymous 

 

Please update to below

 

ClearCollect(colGridDate,With({_Item: Taskboard}, Filter(_Item, IsBlank(....

) //With Ends
) //ClearCollect Ends

 

Not fully typed your code.. Please send me your current code, I will update it if any help.

 

Anonymous
Not applicable

.

Anonymous
Not applicable

Hi again so far I have it now . only one error I still have in the search of my employees somehow he does not want this code ... (highlighted in yellow in the picture)

Macbek_0-1633765573490.png

 

Hi @Anonymous,

 

AssignSearch.SelectedItems is an array of record (event if you selected one person).

You can try something like : First(AssignSearch.SelectedItems).DisplayName

 

By the way, if you have the opportunity to filter on email instead of DisplayName it would be better, as DisplayName can be format differently accros the system. And Email is unique for sure.

 

 

 

Anonymous
Not applicable

Hi thx but is not working 

Macbek_0-1633780519073.png

ClearCollect(
colGridData,
Filter(
Taskboardapp,
StartsWith(
Title,
TextInput12.Text
)
&& ( 'Assigned to'.DisplayName = First(AssignSearch.SelectedItems).DisplayName || AssignSearch.Selected = Blank() )
&& ( 'Sub Info'.Value = Priosearch.Selected.Value|| Priosearch.Selected.Value = Blank() )
&& ( Category.Value = Categorysearch.Selected.Value || Categorysearch.Selected.Value = Blank() )

,

'Start date' >= DatePicker1.SelectedDate && 'Start date' <= DatePicker1_1.SelectedDate
)
);

StalinPonnusamy
Super User
Super User

Hi @Anonymous 

 

Try this 

ClearCollect(
colGridData,
With(
    {taskboard: Taskboardapp},
    Filter(
        taskboard,
	(StartsWith(Title,TextInput12.Text))
	&& ( IsEmpty(AssignSearch.SelectedItems) || 'Assigned to'.Email in AssignSearch.SelectedItems.Email)
	&& ( IsBlank(Priosearch.Selected) || 'Sub Info'.Value = Priosearch.Selected.Value)
	&& ( IsBlank(Categorysearch.Selected) || Category.Value = Categorysearch.Selected.Value)
        && (IsBlank(DatePicker1.SelectedDate) || 'Start date' >=DatePicker1.SelectedDate)
        && (IsBlank(DatePicker1_1.SelectedDate) || 'Start date' <= DatePicker1_1.SelectedDate)
    ) //Filter ends
) //with ends
) //Collect ends

 

StalinPonnusamy
Super User
Super User

Hi @Anonymous 

 

My Assumption is 

 

AssignSearch - Person field (ComboBox)

Priosearch - Choice (Dropdown)

Categorysearch - Choice (Dropdown)

'Start date' - Date

 

We can change the code if anything changes

 

Anonymous
Not applicable

Many thanks first

Unfortunately it won't run with this code either.
&& ( IsEmpty(AssignSearch.SelectedItems) || 'Assigned to'.Email in AssignSearch.SelectedItems.Email)
if I take this out everything works fine but the filter function for this column does not work. I have tried everything with email /name ect. but nothing works.

StalinPonnusamy
Super User
Super User

Hi @Anonymous

 

No Problem. We can find the issue. Please clarify few questions

  1. AssignSearch is person field?
  2. Share the Items property of this Combobox. 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,031)