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 / Compose "Disconnect" /...
Power Automate
Answered

Compose "Disconnect" / First expression

(1) ShareShare
ReportReport
Posted on by 212
Hello everyone, 
 
How can I separate everything before the "/" in the following expression 
Test Timber Regulation Libary/Fileupload/Dehner_01.08.2024 (ID 12)/. 
I would like to have only "Test Holzverordnung Libary/Dateiupload/Dehner_01.08.2024 (ID 12)" without "/". I can do that with the Compose function, but what is the expression called?
 
Thank you and best regards
patrick 
Categories:
I have the same question (0)
  • Suggested answer
    AnthonyAmador Profile Picture
    2,553 Moderator on at
    You can use the substring and lastIndexOf functions in Power Automate to achieve this. Here’s how you can do it:
    Get the position of the last “/”: lastIndexOf('Test Timber Regulation Libary/Fileupload/Dehner_01.08.2024 (ID 12)/', '/')
     
    Extract the substring up to the last “/”: substring('Test Timber Regulation Libary/Fileupload/Dehner_01.08.2024 (ID 12)/', 0, lastIndexOf('Test Timber Regulation Libary/Fileupload/Dehner_01.08.2024 (ID 12)/', '/'))

    Putting it all together, the expression would look like this:
    substring('Test Timber Regulation Libary/Fileupload/Dehner_01.08.2024 (ID 12)/', 0, lastIndexOf('Test Timber Regulation Libary/Fileupload/Dehner_01.08.2024 (ID 12)/', '/'))

     
    Hope this helps. 
    Anthony. 

    If my reply answers your question, please like and mark it as verified. This helps me stay motivated to assist others and makes it easier for users with similar questions to find the answer. Thanks!
    Feel free to connect with me on LinkedIn!
     
  • Verified answer
    WillPage Profile Picture
    2,307 Super User 2025 Season 2 on at
    If it's as simple as removing the last character (all the input strings will have a trailing / character), then you can strip it off simply like substring(outputs('Compose'),0,sub(length(outputs('Compose')),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 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