IM trying to filter my data table by the manager types from my sharepoint list:
Solved! Go to Solution.
If you want the category to be in ABC order, you can add the column to SortByColumns and give it a SortOrder of Ascending
SortByColumns(
Filter('Employee Activity List',
Employee.DisplayName = User().FullName,
Status.Value = "Needs Approval",
Manager_x0020_Group.Value = "Self-Improvement"
),
"SubmissionDate", SortOrder.Descending,
"Category", SortOrder.Ascending
)
The important part is "Category", Ascending.
SortByColumns(
<<source>>,
"SubmissionDate", SortOrder.Descending,
"Category", SortOrder.Ascending
)
Because SortOrder.Ascending is default value, and because this is last column and SortOrder is optional, you can instead write this:
SortByColumns(
<<source>>,
"SubmissionDate", SortOrder.Descending,
"Category"
)
Note that if "Category" is not desired to be the last column specified, the SortOrder is not optional, and should be written like this:
SortByColumns(
<<source>>,
"Category", SortOrder.Ascending,
"SubmissionDate", SortOrder.Descending
)
Writing something like "Category","SubmissionDate" like the below would give an error and should not be done:
//DO NOT DO THIS
SortByColumns(
<<source>>,
"Category",//DO NOT DO THIS
"SubmissionDate", SortOrder.Descending
//DO NOT DO THIS
)
//DO NOT DO THIS
Check if it helps @Dknight7
Hello @Dknight7 ,
By "Manager Type", did you mean "Manager Group"?
What filter have you tried so far which didn't work?
How do you want your data to be filtered?
I just want to filter the data based off the manager groups: centers of excellence, responding to rfsp, social media, etc. They're the same as the categories
How do you want to filter the manager? With a dropdown or a text input?
What type of column did you use? Is it a choice-type or a lookup-type?
A choice-type column requires the use of a subproperty « .Value » whenever we'll try to filter the manager, whereas a lookup-type is more complicated as it'll need a "LookUp()" to first retrieve the record from its source table before comparison.
Sorry for all the questions, the subject is rather vague to give a concrete answer.
Just do something like:
SortByColumns(
Filter('Employee Activity List',
Employee.DisplayName = User().FullName,
Status.Value = "Needs Approval",
'Manager Group'.Value = "Self-Improvement"
),
"SubmissionDate", Descending
)
If that doesn't work or gives some error, then try this instead and see if it works better:
SortByColumns(
Filter('Employee Activity List',
Employee.DisplayName = User().FullName,
Status.Value = "Needs Approval",
Manager_x0020_Group.Value = "Self-Improvement"
),
"SubmissionDate", Descending
)
See if it works.
Other than this, as @WiZey says some more detail might help such as what formula you tried or what it is you want to do.
This works, but now I need to organize it by the same group in alphabetical order:
for example:
-Responding to rfps
-Responding to rfps
-Responding to rfps
-Self improvement
-Self improvement
I wanted them filtered in the data table as well, similar to how it filters the employee name
centers of excellence
centers of excellence
responding to rfsp
responding to rfsp
social media
If you want the category to be in ABC order, you can add the column to SortByColumns and give it a SortOrder of Ascending
SortByColumns(
Filter('Employee Activity List',
Employee.DisplayName = User().FullName,
Status.Value = "Needs Approval",
Manager_x0020_Group.Value = "Self-Improvement"
),
"SubmissionDate", SortOrder.Descending,
"Category", SortOrder.Ascending
)
The important part is "Category", Ascending.
SortByColumns(
<<source>>,
"SubmissionDate", SortOrder.Descending,
"Category", SortOrder.Ascending
)
Because SortOrder.Ascending is default value, and because this is last column and SortOrder is optional, you can instead write this:
SortByColumns(
<<source>>,
"SubmissionDate", SortOrder.Descending,
"Category"
)
Note that if "Category" is not desired to be the last column specified, the SortOrder is not optional, and should be written like this:
SortByColumns(
<<source>>,
"Category", SortOrder.Ascending,
"SubmissionDate", SortOrder.Descending
)
Writing something like "Category","SubmissionDate" like the below would give an error and should not be done:
//DO NOT DO THIS
SortByColumns(
<<source>>,
"Category",//DO NOT DO THIS
"SubmissionDate", SortOrder.Descending
//DO NOT DO THIS
)
//DO NOT DO THIS
Check if it helps @Dknight7
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
| User | Count |
|---|---|
| 257 | |
| 85 | |
| 61 | |
| 53 | |
| 36 |
| User | Count |
|---|---|
| 358 | |
| 154 | |
| 87 | |
| 85 | |
| 74 |