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 Apps / Get Nth Item from the ...
Power Apps
Unanswered

Get Nth Item from the result of Split function

(0) ShareShare
ReportReport
Posted on by 249

Hi,

I have to get the 5th & 6th item splitted by '/' in an URL (like : "https://hello.com/sites/customer/portal/details") which is customer & portal.
I have used the split function and stored it in collection with one Column (Result).

ClearCollect(colSplittedURL,Split(TextInputURL.Text,"/"))

How can I get Nth (5th & 6th) item from collection colSplittedURL?

 I know First(colSplittedURL) gives the first item and Last(colSplittedURL) gives the last item of the collection but I don't know how to get soemthing in the middle.

 

Thanks,

Nabin

 

 

Categories:
I have the same question (0)
  • Verified answer
    CarlosFigueira Profile Picture
    on at

    You can use a combination of the FirstN and Last functions to access an item at a specific index. To get the 5th element from your collection you'd use

    Last(FirstN(colSplittedUrl, 5))

    And similarly for the 6th element:

    Last(FirstN(colSplittedUrl, 6))

    Hope this helps!

  • Community Power Platform Member Profile Picture
    on at

    "Sameer : CKayako : Shaikh : Manish Aggarwal :"

    Is it possible to split in any suggestion 

    Sameer

    CKayako

    Shaikh

    Manish Aggarwal

    Separately in different 4 Text-input Box

  • pNabin Profile Picture
    249 on at

    @Anonymous Could you try:

    Split(StringToSplit,":")

    And you can remove the last item as it is empty because of ":" at the end. 

  • Community Power Platform Member Profile Picture
    on at

    @pNabin 

    Thanks for Help.

    but it still shows this error.

    Error-1.PNG

  • liridonuka Profile Picture
    46 on at

    Try:

    First(Split(Label58_1.Text,":")).Value or Last(Split(Label58_1.Text,":")).Value

    as it expects text value

  • IvoYanWL Profile Picture
    8 on at

    Now there's the Index function:

    Index(Split(myString, delimiter), 1) - returns a row/record at index 1;

    Index(Split(myString, delimiter), 1).Value - returns the value/substring of the row/record at index 1;

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard