cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HydrogenUtility
Advocate II
Advocate II

Accessing "Modified" time from SharePoint action "Get files (properties only)". No clear way to access to the output.

I can successfully query a folder in SharePoint and view output using the Get files (properties only) action. The output in JSON is like this:

 

{
    "@odata.etag": "\"2\"",
    "ItemInternalId": "942",
    "ID": 942,
    "Modified": "2021-05-18T23:54:53Z",
    "Editor": 
    {
      "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
      "Claims": "i:0#.f|membership|office.admin@hydrogenutility.com",
      "DisplayName": "Office Admin",
      "Email": etc,
      "Picture": etc,
      "Department": "",
      "JobTitle": ""
    }
etc etc etc
}

 

...and so on as nested JSON elements for each file in the folder.

What I need to do is grab the 'Modified' elements for each file and find the newest, get it's ID and then perform actions on that file.

 

So how do I succinctly access the "Modified" element (key and value) for each file and work with them recursively?

 

Example output:

Screen Shot 2021-05-19 at 2.02.21 pm.png

 

Thanks in advance!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @HydrogenUtility ,

you can use 'Order By' field in 'Get files...' and set it to:

Modified desc

and at the same time limit the number of returned files to 1. That way 'Get files...' will return only the single file with the latest modified date and you can work with it.

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

2 REPLIES 2
tom_riha
Super User
Super User

Hello @HydrogenUtility ,

you can use 'Order By' field in 'Get files...' and set it to:

Modified desc

and at the same time limit the number of returned files to 1. That way 'Get files...' will return only the single file with the latest modified date and you can work with it.

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
HydrogenUtility
Advocate II
Advocate II

Thanks again @tom_riha .

Simple, elegant and effective.

This is what I will do.

Regards,

Lachlan

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,318)