web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send an HTTP request t...
Power Automate
Unanswered

Send an HTTP request to SharePoint - Sorting and output

(0) ShareShare
ReportReport
Posted on by 296
Good Morning
 
I have a list with lots of dates so I'm getting the info with HTTP as the Get Item actions won't pull all the information I need through. However, I have two issues.
 
_api/web/lists('xxxxx')/items?$filter=FlightLocator eq null&$orderby=StartDate asc
 
Sorting
I have tried $orderby but it's not sorting it. I then plug the output (@{outputs('Send_an_HTTP_request_to_SharePoint')?['body']['d']['results']}) into a loop. And I tried to add a sort here (outputs('Send_an_HTTP_request_to_SharePoint')?['body']['d']['results']['StartDate']). That gives me an error that it can't access StartDate. 
 
How can I sort my array?
 
Person fields:
"AuthorId"33,
"EditorId"33,
I'm also pulling a few person fields but they only comes through as an ID. How can I get the corresponding person from that information? Or is there a switch I can flick that will give me more info?
 
Thanks,
Christine
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,412 Super User 2025 Season 2 on at
     
    if you don’t mind me asking, what are you not able to get from get Items. 
     
    I’m on my phone so just checking and will
    help 
  • Amapola188 Profile Picture
    296 on at
    I want 4 of the date fields in the list, a couple of person fields and some choice fields. Two of the date fields don't come through on the Get Items action.
    The old can't have that many complex fields malarkey.
  • Michael E. Gernaey Profile Picture
    53,412 Super User 2025 Season 2 on at
     
    Would you be ok with sharing your schema with me. Truthfully I am not able to reproduce that but I believe you completely.
     
    I'd like to repro it if i can and I promise to help you resolve your issue 1 way or the other no later than tomorrow. I'm trying to stay off for the night but if no one else does.
     
    But if you share your schema, i'll create an identical list and be happy to help.
     
    I am wondering if its the Filter part you mean is too complex? That I can see, but if that is it, i believe I can help you get past it in a good way :-)
     
    I created this
    5 Date Times
    3 persons
    2 Choices
    1 Text
     
    I also generated data for it 15,000 rows
     
    I update you on my ability to pull it and sort etc then we can compare what you are doing if i need to adjust my side.
     
     
    Thanks for your patience
  • Amapola188 Profile Picture
    296 on at
     
    Hi Michael
     
    Not sure I understand what you mean by schema - I don't have a Parse JSON action.
     
    This is what comes through on the Get Items action - Filter is (EndDate gt '@{utcNow()}') and (Status ne 'Cancelled')
          {
            "@odata.etag": "\"11\"",
            "ItemInternalId": "120",
            "ID": 120,
            "Title": "XXXXXXX",
            "Status": {
              "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
              "Id": 0,
              "Value": "Provisional"
            },
            "Status#Id": 0,
            "Course": "XXXXXXX System Training",
            "CourseCode": "XXXXXXX",
            "StartDate": "2025-04-20T21:00:00Z",
            "EndDate": "2025-04-26T04:30:00Z",
            "Location": "Shanghai",
            "perCSE": {
              "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
              "Claims": "i:0#.f|membership|XXXXXXX",
              "DisplayName": "XXXXXXX",
              "Email": "gXXXXXXX",
              "Picture": "XXXXXXX",
              "Department": "XXXXXXX",
              "JobTitle": "SEngineer"
            },
            "perCSE#Claims": "i:0#.f|membership|XXXXXXX",
            "ConnectedTraining": false,
            "ConnectedLeave": true,
            "VisaRequired": false,
            "DateCalc": "2025-01-20T20:00:00Z",
            "FlightRequest": "XXXXXXX",
            "Currency": {
              "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
              "Id": 1,
              "Value": "AUD"
            },
            "Currency#Id": 1,
            "CalendarView": "XXXXXXX",
            "LocationChoice": {
              "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
              "Id": 0,
              "Value": "Shanghai"
            },
            "LocationChoice#Id": 0,
            "{Identifier}": "Lists%252fTraining%252f120_.000",
            "{IsFolder}": false,
            "{Thumbnail}": {
              "Large": null,
              "Medium": null,
              "Small": null
            },
            "{Link}": "XXXXXXX",
            "{Name}": "XXXXXXX",
            "{FilenameWithExtension}": "XXXXXXX",
            "{Path}": "Lists/Training/",
            "{FullPath}": "Lists/Training/120_.000",
            "{ContentType}": {
              "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedContentType",
              "Id": "0x0100AC3014A5A9D3EE43A0099BA5C72D573D00D88437524CBAEF46B86B6AF0FAB71DEE",
              "Name": "Item"
            },
            "{ContentType}#Id": "0x0100AC3014A5A9D3EE43A0099BA5C72D573D00D88437524CBAEF46B86B6AF0FAB71DEE",
            "{HasAttachments}": false,
            "{VersionNumber}": "11.0"
          },
     
    Same record from HTTP:
                        "FileSystemObjectType": 0,
                        "Id": 120,
                        "ServerRedirectedEmbedUri": null,
                        "ServerRedirectedEmbedUrl": "",
                        "ID": 120,
                        "ContentTypeId": "0x0100AC3014A5A9D3EE43A0099BA5C72D573D00D88437524CBAEF46B86B6AF0FAB71DEE",
                        "Title": "XXXXXXX",
                        "Modified": "2025-04-08T01:22:38Z",
                        "Created": "2025-03-28T02:32:13Z",
                        "AuthorId": 33,
                        "EditorId": 33,
                        "OData__UIVersionString": "11.0",
                        "Attachments": false,
                        "GUID": "511bf770-efb5-4163-9e96-23a127263fcf",
                        "ComplianceAssetId": null,
                        "Course": "XXXXXXX",
                        "CourseCode": "XP2MOBMIRA",
                        "StartDate": "2025-04-20T21:00:00Z",
                        "EndDate": "2025-04-26T04:30:00Z",
                        "Location": "Shanghai",
                        "perCSEId": 89,
                        "perCSEStringId": "89",
                        "FlightBooked": null,
                        "FlightLocator": null,
                        "ConnectedLeave": true,
                        "ConnectedTraining": false,
                        "Status": "Provisional",
                        "VisaRequired": false,
                        "DateCalc": "2025-01-20T20:00:00Z",
                        "FlightRequest": "XXXXXXX",
                        "TicketPrice": null,
                        "TrainingConnectedID": null,
                        "OData__ColorTag": null,
                        "AccommodationCost": null,
                        "Currency": "AUD",
                        "CalendarView": "XXXXXXX",
                        "LocationChoice": "Shanghai",
                        "departureTime": null,
                        "arrivalTime": null,
                        "Approval": null,
                        "DepartureDate": "2025-04-12T12:00:00Z",
                        "ReturnDate": "2025-04-25T12:00:00Z",
                        "destinationAirport": "PVG",
                        "depAirport": "Auckland (AKL)"
     
    I'm after the DepartureDate and ReturnDate but also the person field which only comes through as that odd id from HTTP. But the dates don't come at all on the Get Items action.
     
    I'm plugging the output from HTTP into the loop (@{outputs('Send_an_HTTP_request_to_SharePoint')?['body']['d']['results']})
    I just need to find a way how to process that person field.
     
    Thanks,
    Christine
     
     
  • Michael E. Gernaey Profile Picture
    53,412 Super User 2025 Season 2 on at
     
    The schema is whatever your data model is. So schema, data model, same diff.
     
    Do me a favor, let's try a couple of things
     
    1. Change your Get Items, so that you are only pulling back the fields you need, if you do not need all of them don't pull them back.
     
    There is no reason I can tell just from the JSON that they are not there
     
    Do you have any views setup? Is the Get Items using a view?
     
    If you do not mind trying that real quick.
  • Amapola188 Profile Picture
    296 on at
    My workaround solution now is:
    • I'm using Get Items based on a view and that gives me the person details
    • However, another field I need to filter on doesn't come through. It's a text field so I'm solving this by having a default value of XX in the field and filtering on that. Very crude but neither Get Items or the Filter action can filter on something that's not there.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard