{tocify} $title={Table of Contents}
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.
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.
Error/Issue
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.'." } }
'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.
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
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.
If you have questions or suggestions, feel free to do in comments section below !!!
Do share if you find this helpful .......
Knowledge Sharing is Caring !!!!!!
Learn More about Logic App
- Developing Logic app standard workflow which uses Map locally and deploying to Azure
- Developing Logic App Standard Workflow Using Visual Studio Code | Create Logic App Standard Workflow Using Visual Studio Code
- Logic App - Xml to Json using Liquid Map | Append in Liquid Map
- How to use Azure Event Grid Custom Topic | Publishing and Subscribing from Azure Event Grid Custom Topic using Logic App
- Using Azure Storage Account Table as Config Store for Logic Apps | How to read and write from Logic App to Azure Storage Account Table
- Get Logic App Name in Logic App
- Difference between Logic App Consumption and Logic App Standard
- Getting Started with Logic App Standard | Overview of Logic App Standard | Basics of Logic App Standard
- How to find count of Logic App executions using Azure Portal
- Azure Functions vs Azure Logic App | Difference between Azure Functions and Azure Logic App
- Getting started with Logic App : Liquid Map | Using Liquid template in Logic app
- How to get actual error message of Scope in Logic App | Exception Handling in Logic app
- Interview questions and answers on Logic Apps | Interview questions for azure logic app developers
- How to execute Stored Procedure in Logic App | How to connect to SQL in Logic App
- How to get current date in logic app | How to format date time in Logic App
- BizTalk Developer getting started with Logic App
- Getting Started with Logic Apps - Fundamentals
- Getting Started with Logic Apps - Enterprise Application Integration
- Getting Started with Logic Apps - AS2
- Getting Started with Logic Apps - EDI X12 Fundamentals
- Getting Started with Logic Apps - XML to EDI X12
- Getting Started with Logic Apps - EDI X12 to XML
- Getting Started with Logic Apps - What happened to the Request?
- Inserting Multiple Records In On Prem SQL Using Logic App
- Inserting data in On Premises SQL Database using Logic Apps
- Installing and Configuring On Premises Data Gateway - By adding user to Active Directory
- XML Batching(Aggregation) in Logic App
- Batching(Aggregating) messages in Logic App
- Debatching(Splitting) JSON Message in Logic Apps - ForEach and SplitOn
- Debatching(Splitting) XML Message in Logic Apps - ForEach and SplitOn
- Securing Logic App with Azure Active Directory authentication
- Removing ns0: prefix from xml output from BizTalk/Logic app XSLT map
- Using Managed Identity in Logic Apps for Calling Active Directory Secured Function App
- Logic Apps : Fetching ISA and GS Segment Values From Interchange Envelope and Mapping
- Logic Apps : For Each Inside a For Each - Fetching values from field in an array inside an array