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

Sharepoint get items filter by created by

Hi Jedi's, force be with ya'll

How can identify the field name for the users who created the items on my sharepoint list

Eg1: Author eq 'Luke Skypea'
Eg2: CreatedBy eq 'Luke Skypea'
7 REPLIES 7
Gristy
Resident Rockstar
Resident Rockstar

Hey

I am afraid the Filter Query is not supported for Person Field usage.

To work with Person field in SharePoint List through the REST Call, we need to take use of the $Expand function within OData, while currently only the following is supported:

$filter

$orderby

$top

Anonymous
Not applicable

Hi Gritsy thank you for the information, if i know this earlier i should just created a force name inoutation on my sharepoint, and right now i have 4000 records
Gristy
Resident Rockstar
Resident Rockstar

Create a new SLT field that is hidden

Use flow to populate that field with the Created By Name

Filter on that field.

 

You will need to go through and update the existing 4000 but you could do that with a instant flow also i.e. Get Items, Update Item

Anonymous
Not applicable

Hi, I am almost there
What i did is using flow i used
1.Get items where it had an output of all records
2.apply each item
2.1 update items
fields str_createdby = Author.displayname and str_modifiedby = edited.displayname

Result: it went good just in 99 records the rest are faileds, plus the 99 records was modified by me instead of modified my others
Gristy
Resident Rockstar
Resident Rockstar

to modify by others you would need to use SEND HTTP action to pass in correct value.

MartinPyman
New Member

I know this is an old query, but thought I'd explain a solution (and I will add more details to my blog soon)

 

When you use Get Items in Power Automate and you want to use the filter property, there's a couple of things to note. The Odata query is expecting the ID for the user from the User Information List, Modified By and Created By internal names are Editor and Author.

 

This is what you can do...   

Do a get items to the Site Collection that hosts the library you want to get stuff out of, use a custom value in the List Name... type "User Information List" - without the quotes

 

On this step add the following filter where Display Name is the display name of the users you want to get   

Title eq 'Display Name'

 

Just for debugging you can then make a compose function and set it to this expression (assuming the step name was "Get items") - this also assumes you don't have duplicate display names in your AD

first(outputs('Get_items')['body/value'])?['ID']

 

Then do a second Get Items on the list you want to filter Created By. In the filter section put in 

Author eq 'Outputs' 

(where outputs is the dynamic content output from the Compose step)

 

Hope it helps

MartinPyman
New Member

There's an even easier solution you can find it on my blog

https://martinpyman.blogspot.com/2021/10/power-automate-get-sharepoint-items-by.html

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,265)