cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
fordwayrichardg
Level: Powered On

Split Not Working Correctly - Advice Please

Hello, all.

 

I have created a Flow that triggers when a certain email is received in Office 365. The flow runs the following actions:

  1. When New Email Arrives from 123@abc.com to 456@xyz.com
  2. Data Operations (Compose) for the email body
  3. Convert Html to Plain Text for the previous Compose
  4. Data Operations (Compose) split the previous Compose into an array, breaking on the semi-colon symbol
  5. Data Operations (Compose) sub-divide the previous Compose array element contains some specific text
  6. Create a Calendar Event containing the sub-division of the previous Compose

I am finding that sometimes this works and the calendar event is generated. Sometimes, the Flow fails at the Create Calendar Event action because the previous sub-division of the array element fails.

 

Initial Compose Array (Working Example)

[
"\n\nScheduled From - 24 September 2017, 14:00:00",
"\n\nScheduled To - 24 September 2017, 17:30:00",
"\n\nSummary - This is some sample text."
]

 

Sub-Division of Summary into Array to Extract Specific Text (Working Example)

[
"\n\nSummary",
"This is some sample text."
]

 

Initial Compose Array (Not Working Example)

[
"\n\nScheduled From - 24 September 2017, 14:00:00",
"\n\nScheduled To - 24 September 2017, 17:30:00",
"\n\nSummary – This is a super, really, mega awesome project. Richard is really\nlooking forward to working on this."
]

 

Sub-Division of Summary into Array to Extract Specific Text (Not Working Example)

[
"\n\nSummary – This is a super, really, mega awesome project. Richard is really\nlooking forward to working on this."
]

 

As you can see, the initial composition of the email body is correct for both. The message has been broken into the array members as designed. In the first example, the Summary line has been split into two array members; I need the second array member containing the useful text.

 

In the second iteration where I use a longer, more complex summary text, it fails and the string is not sub-divided into two array members. The Compose Data Operation returns only a single member array which breaks the Create Calendar Event action. 

 

Can anyone shed any light on why this is happening? After some testing, it appears that it is the Html to Plain Text action causing this. I have tried directly processing the Html for the Compose action but that does not work at all.

 

Any thoughts welcome. If there is a better way to do this to ensure that any complex text in the summary field does not break the Flow, I am listening.

1 ACCEPTED SOLUTION

Accepted Solutions
fordwayrichardg
Level: Powered On

Re: Split Not Working Correctly - Advice Please

I found the issue. I have to say: I feel pretty stupid for the cause. I have been sending test emails from Outlook to get the flow working as planned. Outlook, in some cases, has been auto-correcting my hyphen (short dash) into a long dash. This obviously does not then match the criteria for the split and hence does not work.

1 REPLY 1
fordwayrichardg
Level: Powered On

Re: Split Not Working Correctly - Advice Please

I found the issue. I have to say: I feel pretty stupid for the cause. I have been sending test emails from Outlook to get the flow working as planned. Outlook, in some cases, has been auto-correcting my hyphen (short dash) into a long dash. This obviously does not then match the criteria for the split and hence does not work.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 234 members 4,688 guests
Please welcome our newest community members: