cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rwittels
Resolver I
Resolver I

Get last part of a string

Hi. I have a Gallery and one of the labels is an image URL e.g.

 

https://subdomain.sharepoint.com/sites/myTeam/Shared Documents/Image.jpg

 

Instead of displaying the URL, I would prefer to display just Image.jpg

How do I get the last part of the URL string after the last /?

1 ACCEPTED SOLUTION

Accepted Solutions
ganeshsanap
Memorable Member
Memorable Member

@rwittels Use below formula:

 

Last(Split("https://subdomain.sharepoint.com/sites/myTeam/Shared Documents/Image.jpg", "/")).Result

 

Output:

Split image URL.PNG


Please click Accept as solution & 👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

View solution in original post

3 REPLIES 3
JayMagness
Solution Specialist
Solution Specialist

HI,

 

Try this:

Concat and Concatenate functions - Power Apps | Microsoft Docs

 

- If the first part is the same you can take after the last "/"

 

Or if this is a gallery I would just show the image in the gallery and let them launch it on select.

I have read up on Concat and Split but cannot find an explanation of what I am trying to do.
My images are in SharePoint and PowerApps does not support image authentication in mobile apps yet so the images don't display on a mobile device.

I'll keep trying. Thanks. 

ganeshsanap
Memorable Member
Memorable Member

@rwittels Use below formula:

 

Last(Split("https://subdomain.sharepoint.com/sites/myTeam/Shared Documents/Image.jpg", "/")).Result

 

Output:

Split image URL.PNG


Please click Accept as solution & 👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,758)