cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vbvbvb
Microsoft
Microsoft

Append to string variable + Sharepoint Get Items = Alphabetical order?

Hello all,

 

Looking for a sanity check. While using Get Items to return specific list of items, I am using ODATA query and also Order By filter.

In the Order By, there's a value to order Get Items in ascending order using SPO list column called  Assigned containing names :

vbvbvb_0-1611073063416.png

And in Append to string variable action value, there's small HTML code building a simple table with values Get Items return, so final result is just a table with few rows.

 

As the result, when I run this flow, in the output result I can see that Append to string variable action makes all results indeed sorted in Ascending, alphabetical order using Assigned column name, so when I scroll the Apply to all results, names go A,B,C ..etc.

 

But when I actually use that variable to insert table that it builds in the email action which is sent in the end of the flow, rows are scrambled in random order. Is there any way to control that?

 

I want it  to retain this structure:

 

000331  - Product  1 - N/A - Assigned to: Adam 

000231  - Product  1 - N/A - Assigned to: Adam 

000411  - Product  2 - N/A - Assigned to: Brian

000654  - Product  1 - N/A - Assigned to: Colin

 

Instead I see random table like:

 

000411  - Product  2 - N/A - Assigned to: Brian

000331  - Product  1 - N/A - Assigned to: Adam 

000654  - Product  1 - N/A - Assigned to: Colin

000231  - Product  1 - N/A - Assigned to: Adam 

 

Any way around it?

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

Check the settings for your Apply to Each and make sure that concurrency is not enabled.  Otherwise the items should be added in the order that they are processed.  The other possibility is that something is happening based on the html you are building.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User III
Dual Super User III

Check the settings for your Apply to Each and make sure that concurrency is not enabled.  Otherwise the items should be added in the order that they are processed.  The other possibility is that something is happening based on the html you are building.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Thanks @Pstork1 , I am using Concurency to process results via Get Items faster, but I didn't knew it has such effect. Switching it off thou doesn't make any change - each new run has random results. As of HTML - it's super simple:

<tr><td style="min-width: 550px"> <strong> ... various items from Get Items - @{items('Apply_to_each') .... </td> </tr>

Not sure what else to check.

@Pstork1  please disregard earlier reply, it worked after removing Pagnation control on Get items 🙂

Helpful resources

Announcements
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

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Users online (52,511)