I have a filter button that will filter data in a specific order.
OnSelect I have this:
ClearCollect(col_Engineers,SortByColumns(EngineersV2,"Total_x0020_Assigned",SortOrder.Descending));
So I grab all my engineers, and sort them by the number of assigned cases.
Depending on which filter (check box) I have selected, it will show me those records.
For example, if I choose to show all Available engineers, the code is:
If(
l_available,
ClearCollect(
col_Engineers,
Filter(
col_Engineers,
EngineerQueueStatus.Value = "Available" || 'EngineerQueueStatus'.Value = "Out of Queue Soon"
)
)
);
If I want to see who is in the office:
If(
l_inoffice,
ClearCollect(
col_Engineers,
Filter(
col_Engineers,
EngineerQueueStatus.Value <> "Unavailable"
)
)
);
The office one is the one i want to change.
I want to add some code to this piece, so that instead of sorting by total number of cases which is what the collection is set at, I would like to override that ONLY for this piece (inoffice).
I want to filter out the collection for ANYONE that has a queuestatus value of anything except Unavailable.
Then instead of showing me everyone in the office sorted by total cases, I want to sort it by the values in that Choice column.
So for me, I want it to sort like this..
Engineers in this order:
Available
Out of Queue Soon
Out of Queue
In Queue Soon
I keep running into errors.
I tried to add a SortByColumn into that inoffice piece of code, but it kept throwing up on me.