Logic Apps: Repeating over SqlConnector Relsult

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

When repeating over list of results, you might often run in problems, which are sometimes very difficult to understand even if solution is trivial one.

Here is one example:

{"code":"InvalidActionRepeatExpression","message":"Repeat expression result of action 'http' is invalid: maximum 'Array' and actual 'Object'."}

I used HTTP connector to post result to HTTP endpoint. This is why ‘http’ action fails. Originally I used Repeat expression

@triggers().output.body

This is not correct, but how could one know that?

If you go to output link of your connector, you will see following:

image

You see JSON message as it was sent from SQL Connector trigger operation. There you can notice Rows-collection.
My expression repeated over “body”, which is not an collection.

So, I changed expression as shown below and all works fine.

image


Posted Nov 10 2015, 07:57 AM by Damir Dobric
developers.de is a .Net Community Blog powered by daenet GmbH.