Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

The 'from' property value in the 'query' action inputs is of type 'Object'. The value must be an array

{tocify} $title={Table of Contents}


Scenario

In a logic app where I have to read the blob files having specific suffix in name from the list of blobs, I used Filter Array from Data operations.




Filter array is an action in Azure Logic Apps that can be used to filter an array/list/collection of items/records based on a certain condition.

It returns an array of items that meet the specified condition. You can use this action to filter an array of objects or an array of strings.

In testing it worked fine except for one scenario - when there was only one record in the list.




Why it happened 

When there was only one blob the http call to get list returned one item/record - so array was not formed, it remained as single JSON object.



And it is used as the input to Filter array, but Filter array doesn't allow anything other than array. Thus it throwed the error.

"BadRequest.The 'from' property value in the 'query' action inputs is of type 'Object'. The value must be an array. "



What to do

Having a single blob file is a valid scenario, and also the complain by Filter Array action is also valid - so how to solve it.

We take help of array function, which helps in converting the input into an array


Thus the input which is already an array will remain so, and if single object is received then it is converted to array.




Learn More about some more Logic App errors

  • The request has both SAS authentication scheme and 'Bearer' authorization scheme. Only one scheme should be used
  • Selected file must be between 1 and 2097152 bytes
  • SplitOn property doesn't validate expression at design time
  • The workflow with 'Response' action type should not have triggers with 'splitOn' property
  • The template language function 'xpath' expects its first parameter to be an XML object
  • The template language expression 'xxx' cannot be evaluated because property 'xxx' doesn't exist. Property selection is not supported on content of type 'application/xml'



This post first appeared on TechFindings, please read the originial post: here

Share the post

The 'from' property value in the 'query' action inputs is of type 'Object'. The value must be an array

×

Subscribe to Techfindings

Get updates delivered right to your inbox!

Thank you for your subscription

×