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 Apps / Display in text label ...
Power Apps
Answered

Display in text label second (and subsequent) word/s from string in text input?

(0) ShareShare
ReportReport
Posted on by 97

I have a text input that includes a string with spaces between each different ID reference. I want to split out these IDs into separate text label boxes. 

 

I can separate out the first ID using 

Left(Input_form_notes.Text,Find(" ",Input_form_notes.Text)) 

but after that I'm stuck. 

 

The delimiter is 1 space. In total there are up to 10 IDs in the text input. 

 

I can't use LEFT/MID/RIGHT as the character length will not be fixed amounts. 

 

I've tried using split but didn't seem to work for me, but perhaps I'm just too much of a novice with this function to know how to use!

 

Any suggestions of a formula I can use for splitting out each word at a time to each different text label would be created appreciated.

Categories:
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @h_dunnehowrie,

     

    You can split the Text Input based on the space and use the Index function to fetch the respective ID:

     

    //The following code creates a table of IDs
    Split(Input_form_notes.Text, " ")
    
    //To get e.g. ID 1 you could use (Text property of ID label 1)
    Index(
     //To avoid 10 split functions, you may want to save this to a variable e.g. on a button press if possible
     Split(Input_form_notes.Text, " "),
     1
    ).Value

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • h_dunnehowrie Profile Picture
    97 on at

    Hi @LaurensM , I'm afraid not. I should have said that I had already tried split with index but this doesn't work. Although .Value at the end does work but only for the first ID, which I have this already with a different formula and Index(Split(Input_form_notes.Text, " "),2).Value

    doesn't return the second ID, just an error 

     

    Any other suggestions for formula for capturing the 2nd, 3rd, 4th.... IDs? It's not a problem for me copying into multiple text labels. I assume I need something that will have a number, like above, for each next part in the split, but index with .Value at the end only works for first ID.

  • h_dunnehowrie Profile Picture
    97 on at

    @LaurensM , ah, no, wait. 

    So, 

    Index(Split(Input_form_notes.Text, " "), 2).Value

    does work for 2nd ID. I now realise there was a extra space so it wasn't until I tried adding in 3 instead of 2 and now I can see it. 

     

    However, I now have a 'fun' new problem. For IDs 5-10, when I add in the formula I get this error message - 

    h_dunnehowrie_0-1702498430524.png

    Any advice? 

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @h_dunnehowrie,

     

    The Split and Index functionality should work for all IDs - under the assumption that all IDs are separated by 1 space. I unfortunately am not able to recreate the issue with my test data, would it be possible to share the Input_form_notes value?

     

    Thanks!

  • h_dunnehowrie Profile Picture
    97 on at

    @LaurensM  spoke too soon... it does work! I only get the error message when there is no data (as for the test record I was working with there are only 4 IDs. 

     

    So, you did help and it is working now. Yay! I just needed to add in .Value to your suggestion. 

     

    Thank you so much for your help. 

  • h_dunnehowrie Profile Picture
    97 on at

    Yep. I realised the same after sending. It was an extra space that I hadn't noticed.

  • LaurensM Profile Picture
    12,516 Moderator on at

    Ah ok perfect! Glad I was able to help @h_dunnehowrie😊

     

    I indeed seem to have missed the .Value, thanks for notifying me! I have updated my initial comment accordingly.

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 Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard