I have a staff log where each staff member updates regularly.
I'm trying to create a way of seeing how long it has been since each person updated it.
I need a list which shows the unique value based on the staff member which is filtered to show the most recent entry.
It can't be in a drop down but all visible at the same time.
The staff field is the standard created by from sharepoint and the date is saved as RecordDate.
Thanks in advance
Hi @Markswan20 ,
GroupBy is not supported on complex field types. Use AddColumns to store the complex field attribute (in this case, the Display Name) as a new "virtual" column.
ForAll(
GroupBy(
AddColumns(
Command,
"CreatedDisplayName",
'Created By'.DisplayName
),
"CreatedDisplayName",
"_items"
),
First(
Sort(
_items,
RecordDate,
SortOrder.Descending
)
)
)
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.
Imran-Ami Khan
I've hit a snag, i want the filter to utilise the default field ThisItem.'Created By'.DisplayName
I have imported this into the galley but the coding kicks up error.
This is the current code
ForAll(GroupBy(Command,"'Created By'.DisplayName","_items"),First(Sort(_items, RecordDate, SortOrder.Descending)))
Thank you Amik
@Markswan20 - as I understand it, I think you're trying to create a table of unique values amongst duplicates by the most recent date. Another way to phrase it is that you want to display the latest records in a Gallery amongst duplicates.
If that is correct, you can try applying the below expression in the Items property of a Gallery:
ForAll(
GroupBy(
'Your Data',
"The field which contains duplicates",
"_items"
),
First(
Sort(
_items,
Modified,
SortOrder.Descending
)
)
)
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.
Imran-Ami Khan
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.