Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

Slowness? Or Lost Connection? Or ?

Posted on by 2
Mornin, all.  Odd ball problem (for me) that may make sense to you all.  I'm a newbie, so, there's that...
 
I don't have the luxury of buying/paying for a component that will make importing easy for me, so...
 
Importing a csv that's created by another process (from my company).  It's 2 rows - one is the header, the second is the real data that I need.  Problem with my csv is that it's a mixture of text and numbers, where only the numbers are encapsulated in quotes when there's a comma separator in the thousands place.   (So... Field1Value, Field2Value, 0, "1,234", FIeldValue5.. etc.)
 
So, my flow basically takes the second row in (as a string), chunks it out into individual characters, and then loops through each character to remove the commas that are in the thousands place.  Once I've removed the commas, I then change the separators (comma to pipe) so I have a clean string I can "split". 
 
The problem I'm having is that it never ends.  Well, sometimes it ends - If I reduce the size of the csv - I can get it to finish.  One time I run it it'll be a minute and a half, and another time it'll be 10 minutes.  And then sometimes it won't finish at all.  But if I use the actual file, it never finishes - or at least, I assume it'll never finish, because after 24 hours, if it's not done parsing 2600 characters, then Power Automate is clearly not the way to do this...
 
My CLOUD flow is below (or at least, most of it).  This is the part that seems to never finish, I think.  It's got the spinny circles on my "Apply to each" and the "Replace Comma Quote with Pipe".  Guessing - and it's only a guess - that the Apply to Each isn't finishing?  Or is it something else?
 
Anyone got any suggestions for debugging this mess?
 
Thanks in advance.
 
mw
 
  • CU03111530-0 Profile Picture
    CU03111530-0 2 on at
    Slowness? Or Lost Connection? Or ?
    Thanks, all, for the great responses.  Maybe I need to modify the question - maybe the logic doesn't suit my csv for whatever reason.  Wondering now, if I wanted to debug the foreach (as pictured in the original post) so I could see what's happening through each step - almost a breakpoint after it moves through each character, how would you do that?   
     
  • Suggested answer
    takolota1 Profile Picture
    takolota1 4,750 on at
    Slowness? Or Lost Connection? Or ?
    Oh if you are having in-data comma issues and you can't use a 3rd party connector, then you need this...
    https://community.powerplatform.com/galleries/gallery-posts/?postid=189733b3-bea9-41b3-bc01-ec0fa209005d
  • David_MA Profile Picture
    David_MA 7,541 on at
    Slowness? Or Lost Connection? Or ?
    I think what you are asking is that you want to replace all of the commas in a CSV file with the pipe character (i.e., |) instead. If so and you can get the csv data so the numbers don't contain any commas, but just the raw numbers (e.g. "1234" instead of "1,234", use a Get file content action and then run this expression in a Compose action: replace(outputs('Get_file_content')?['body'], ',', '|'), 
     
     
    This is what happens:
    It completes in milliseconds. Until you upload the image of what your flow is doing, not sure what else to suggest. If you just need to create a new file with pipes instead of commas, generate it from the output of the Compose action.
  • takolota1 Profile Picture
    takolota1 4,750 on at
    Slowness? Or Lost Connection? Or ?
  • David_MA Profile Picture
    David_MA 7,541 on at
    Slowness? Or Lost Connection? Or ?
    No image has been attached that I can see.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,297

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,890

Leaderboard