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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Multiple ID from a...
Power Automate
Unanswered

Get Multiple ID from a string and append to array

(0) ShareShare
ReportReport
Posted on by 195

Hello Everyone, 

Good day! 

I would like to ask if there's any way to get id's on a string and make it an array.


Example string:

#1234 loreim xd test #1422

 

I have manage to get id using expression split(split(trim(items('apply_to_each_here')['Short Description']),' ')[0],'#')[1]. This will get #1234. 


But what I need is to get all ids staring with '#' and make it in array. How to make these possible?

 

Thanks in advance for your help guys!

Categories:
  • takolota1 Profile Picture
    4,980 Moderator on at

    @YamiteKudasai 

     

    One option is to use a Select action and some split expressions.

    So in the From field of the Select action, use

     

    Split(Insert String Here, '#')

     

    So that will split the string so each array line starts with an Id.

    From there, select the alternate view in the top/mid right of the action so the main input section goes from a 2 column table to a blank box.

    In the box use the expression

     

    First(split(item(), ' '))

     

    That should split on spaces & grab the 1st item before the 1st space, in this case the Id.

     

    Then the output of that Select action should be just an array of the Ids that had a # before them.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 423

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 177

Last 30 days Overall leaderboard