web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create a String from a...
Power Automate
Suggested Answer

Create a String from an Array

(0) ShareShare
ReportReport
Posted on by 1,811 Super User 2024 Season 1
I have those 2 actions, one to Select the IDs of SharePoint Items, and one to build a semi-collon separated string from the array:-
 
 
 
 
now the results of the first action is a valid array, but the result of the Compose will be weired:-
 
 
where the result will be {"ID":1250} ... while i were planning to have 1250;
 
Any advice?
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    bscarlavai33 Profile Picture
    752 Super User 2025 Season 2 on at
    There might be a fancier way but one way that will definitely work is to initialize an array variable called "Output" or something similar and then loop through the output of your "SelectAllNetworkIDs" compose. Within the loop, use an "Append to array" against "Output" and use the expression 
    items('Apply_to_each')['ID'].
     
    Finally, after the loop, use a Compose with the join expression.
     
    I tested it and I get the result you're looking for.
     
  • johnjohnPter Profile Picture
    1,811 Super User 2024 Season 1 on at
    @@bscarlavai33 i always try to avoid applytoeach as it is slow and consume a lot of requests.. i think using a Select should work, but not sure what i am doing wrong
  • bscarlavai33 Profile Picture
    752 Super User 2025 Season 2 on at
    Yeah I get that. Its usually not terrible if you're only doing transformations inside the loop and you have it using concurrency.
     
    The problem with Select is that it always returns an object and you just want a single value from each object. I'm not aware of a way to get multiple values from multiple objects at once without using a loop but someone might have a way.
  • Suggested answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    You want to set it up like below. For the Select action, switch it to Map mode.
    The expression in the Compose action is join(body('Select'),'; ')
     
    Your output will be as shown below if I understand your goal correctly:

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard