1

The problem I am having is :

  1. Sharepoint Get File Files (Properties Only) can only do one filter for ODATA, not a a second AND clause so I need to use Filter Array to make secondary filter work. And it does work....

  2. But now I need to take my filtered array and somehow get the {FullPath} property and get the file content via passing a path and I get this error...

enter image description here enter image description here

[ { "@odata.etag": ""1"", "ItemInternalId": "120", "ID": 120, "Modified": "2022-03-21T15:03:31Z", "Editor": { "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", "Claims": "i:0#.f|membership|[email protected]", "DisplayName": "Bob dole", "Email": "[email protected]", "Picture": "https://company.sharepoint.us/sites/devtest/_layouts/15/UserPhoto.aspx?Size=L&[email protected]", "Department": "Information Technology", "JobTitle": "Senior Applications Developer II" }, "Editor#Claims": "data", "Created": "2022-03-21T15:03:31Z", "Author": { "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", "Claims": "i:0#.f|membership|[email protected]", "DisplayName": "Bob Dole", "Email": "[email protected]", "Picture": "https://company.sharepoint.us/sites/devtest/_layouts/15/UserPhoto.aspx?Size=L&[email protected]", "Department": "Information Technology", "JobTitle": "Senior Applications Developer II" }, "Author#Claims": "i:0#.f|membership|[email protected]", "OData__DisplayName": "", "{Identifier}": "Shared%2bDocuments%252fSDS%252fFiles%252fA10_NICKEL%2bVANADIUM%2bPRODUCT_PIS-USA_French.pdf", "{IsFolder}": false, "{Thumbnail}": ...DATA, "{Link}": "https://company.sharepoint.us/sites/devtest/Shared%20Documents/SDS/Files/A10_NICKEL%20VANADIUM%20PRODUCT_PIS-USA_French.pdf", "{Name}": "A10_NICKEL VANADIUM PRODUCT_PIS-USA_French", "{FilenameWithExtension}": "A10_NICKEL VANADIUM PRODUCT_PIS-USA_French.pdf", "{Path}": "Shared Documents/SDS/Files/", "{FullPath}": "Shared Documents/SDS/Files/A10_NICKEL VANADIUM PRODUCT_PIS-USA_French.pdf", "{IsCheckedOut}": false, "{VersionNumber}": "1.0" } ]

2
  • Can you give us a broken down example of the 'Filter array' results (in JSON, not screenshot)? It looks to me like you need another loop because the array will be filtered but that may result in more than one results, no? You go straight from the filter array into the get file content action. Commented Mar 24, 2022 at 2:51
  • I added Output JSON for you Commented Mar 24, 2022 at 13:19

2 Answers 2

0

So from what I can see, I think it's what I thought. Even though you're filtering an array down to a single element, you need to treat it like an array.

I'm going to make an assumption that you're always going to retrieve a single item as a result of your filter step.

I created a variable (SharePoint Documents) to store your "filtered" array so I could then do the work to extract the {FullPath} property.

JSON

I then created variable that is initialised with the first (again, I'm making the assumption that your filter will only ever return a single element) and used this expression ...

variables('SharePoint Documents')?[0]['{FullPath}']

Variable

This is the result and you can use that in your next step to get the file content from SharePoint ...

Result

If my assumption is wrong and you can have more than one then you'll need to throw it in a loop and do the same sort of thing ...

Loop

This is the expression contained within ...

items('For_Each_in_Array')['{FullPath}']

Result ...

Loop Result

Sign up to request clarification or add additional context in comments.

Comments

0

I actually ended up doing this and it works.

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.