cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Draqon
Helper I
Helper I

Excel table randomly ordered, dunno ho to sort that out

Hello,

I have asked about this earlier but apparently my issue is bigger than I thought.

My flow add rows in tables in excel online and put numbers next to them. I wanted to make a variable which will increment each time when row is added. The main problem is that elements are unordered in any way, randomly thrown into an excel table, dunno how to fix that.

This is how this part of flow looks like, let me know If anyone would need any other data. It is downloaded from a sharepoint list in a proper order, but then it is thrown completly out of the blue into a table.

another issue.PNG

2 ACCEPTED SOLUTIONS

Accepted Solutions
Anonymous
Not applicable

So generally you want to make something like ID? 1st row has 1 and 2nd have 2 etc?

It's happening because loop doesn't work only one in the time. You should create variable from expression length and var with 0.

Then you add to 0 on the start of the do until 1 and uses as ID. And do until the condition is count equals length.

Do until works only 1 at the time. That will solve the problem.

 

 

 

--------------------------------------------------------------------------------------------------

My post was helpful? Please don't forget to give Kudos to this post then. If my post was the solution to the problem please also mark this post as solution.

 

View solution in original post

Anonymous
Not applicable

Ok so generally:

1. There were multiple problems with the workflow. We don't need HTTP requests and also we don't need to get tables.

2. You should use list folder to get file ID 

3. You need to fill list rows

4. You need to use the expression which marks table body (chosen from dynamic element) and use integer [0] and ['ColumnName'] to get information

5. Table name have to be custom value

6. file location is file id

View solution in original post

11 REPLIES 11
Anonymous
Not applicable

So generally you want to make something like ID? 1st row has 1 and 2nd have 2 etc?

It's happening because loop doesn't work only one in the time. You should create variable from expression length and var with 0.

Then you add to 0 on the start of the do until 1 and uses as ID. And do until the condition is count equals length.

Do until works only 1 at the time. That will solve the problem.

 

 

 

--------------------------------------------------------------------------------------------------

My post was helpful? Please don't forget to give Kudos to this post then. If my post was the solution to the problem please also mark this post as solution.

 

View solution in original post

@Anonymous  Okay, now I understand why that was happening to my flow. I'm trying to recreate that with "do until" loop, but I'm simply not sure how to do that. Could you maybe point this out? In my excel I'm formatting dates for each element and adding a row into a table.

 applytoeach.PNG

Anonymous
Not applicable

https://www.youtube.com/watch?v=Dv2c7LouTGM

 

--------------------------------------------------------------------------------------------------

My post was helpful? Please don't forget to give Kudos to this post then. If my post was the solution to the problem please also mark this post as solution.

Anonymous
Not applicable

Ok so generally:

1. There were multiple problems with the workflow. We don't need HTTP requests and also we don't need to get tables.

2. You should use list folder to get file ID 

3. You need to fill list rows

4. You need to use the expression which marks table body (chosen from dynamic element) and use integer [0] and ['ColumnName'] to get information

5. Table name have to be custom value

6. file location is file id

View solution in original post

@Anonymous 

Okay, there's a lot to process, thank you for your help.

1. I don't have an http request and I'm not getting tables before that piece of flow.

2. So should I type there file ID instead of choosing a specific file? I thought it's okay.

4. I'm trying to increment a value, now I know it's doable, just have to imporove what I've just made.

5. I'll remember that, is that just a good practice or is it required?

6. Similar to number 2, is it better to use an ID and then filling all Table elements?

 

I'm not really getting number 3

This is what I came up with, with your help. But I'm still getting an error.
flow all.pngflow all2.png

Anonymous
Not applicable

There shouldn't be any loops. If you look on the top of the loop then you will see which body is it. For example outputs()[body/value] or something like this. Then you have to use it and add to this ['ColumnName'] or integer [0] or If you have more rows then variable which you increment on the end of the do until can be used like [variable('count')] or something looking like this 😉 you need just to click variable from the list of dynamics elements. Just delete all loops add composes and try to make composes with every data which you need for excel. Like I showed you during the call. When you will create expressions which gives you the correct data then copy paste them into add a row at excel 😉

Anonymous
Not applicable

One more advise. When you are adding something to add a row column and Power Automate puts a loop take a step back and create expression which will delete this loop.

@Anonymous I'm not sure how am I suppose to take every item there is without that loop. I'll try to do that but I'm not sure I'm getting that right. 'mI quite sure we didn't had a call 😄

I'll check what I can do but I'm not having high hopes.

Anonymous
Not applicable

Just put elements one by one. When you get a loop take a step back and use expression body(nameofaction) with parameters of json. Specify [nameofcollection] and [integer0] when you get loop with 1 item because json says its an array. This is how you can specify which element you need to get.

@Anonymous Do you have any examples that could clear my mind about how that could be done? I just don't understand how can I delete that auto-creating loop from get items action, can't really put that into use.
Anonymous
Not applicable

Okay different way. Just delete everything don't use do until. Use a loop. Then go to the settings of the loop and change parallelism to 1. Parallelism is the amount of the actions done at one time. So you will bet loop one by one.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (71,766)