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

SplitOn property doesn't validate expression at design time

While working on a POC about Debatching in Logic Apps using SplitOn,  I was encountered with an below error when tried to test the workflow

                           



 { "error": { "code": "InvalidTemplate", "message": "The template language expression evaluation failed:
'The template language expression 'triggerBody()[‘PurchaseOrders’][‘PurchaseOrder’]' is not valid:
the string character '‘' at position '14' is not expected.'." } }

Why it happened


The error points out to the expression having invalid character in it at position 14 i.e. the single quote. 

First thought was -  if that is the case then Logic app designer should have stopped me from saving the workflow (Design time validation), but it did not.

And when request was posted to it, logic app runtime gave the error.  Struggled a bit with resolving this and it happened to be a character encoding issue… Thanks to Manojkumar Sachdev for pointing it out.

The reason was I typed in the expression in Microsoft Word, copied it from there and pasted in code view. Saved the logic app and when started testing got the error.  


What to do



To resolve this issue, deleted the single quote which was copied from Microsoft word and typed in single quote directly in code view.


That’s it.. all working fine.

Still, wanted to know why Design time validation didn’t stop me from saving the workflow?


Tried to emulate it with Foreach loop, copied single quote from Microsoft word and added in expression and tried to save it - And I was not allowed, design time validation stopped me from doing it.



So it was clear that issue is only with SplitON property, so tried couple of things with it

1. Removed @ and added incorrect expression -- design time didn't allow me to save



2. Kept @ and added incorrect expression -- design time didn't allow me to save



Not sure if this is bug, or is this how splitOn is designed -- will try to reach out to Microsoft Product team and update if any answer received.


Let me know if you have some inputs on this in comments !!!






Related Post 

  • Getting Started with Logic Apps - Enterprise Application Integration
  • Getting Started with Logic Apps - EDI X12 Fundamentals
  • Getting Started with Logic Apps - What happened to the Request?
  • Getting Started with Logic Apps - Fundamentals
  • Getting Started with Logic Apps - AS2
  • Getting Started with Logic Apps - XML to EDI X12
  • The provided map definition is not valid
  • Required property 'content' expects a value but got null. Path ''.'
  • Getting Started with Logic Apps - File Routing
  • Installing and Configuring On Premises Data Gateway - By adding user to Active Directory
  • Inserting data in On Premises SQL Database using Logic Apps
  • Inserting Multiple Records In On Prem SQL Using Logic App
  • Check your request parameters to make sure the Path “” exists on your file system






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

    Share the post

    SplitOn property doesn't validate expression at design time

    ×

    Subscribe to Techfindings

    Get updates delivered right to your inbox!

    Thank you for your subscription

    ×