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 Automate
Answered

Slice function

(0) ShareShare
ReportReport
Posted on by 69

Hi Everyone,

 

I needed to extract a substring from a string and I used the slice function there. But it's showing an error.
Screenshot 2024-06-28 122605.png

 

 

Does anybody have a clue what I have to do here because I don't?

Categories:
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @Mysterious ,

     

    Please show outputs of this and tell me the substring you want. 

    vmengmlimsft_0-1719558879041.png

     

     

     

    Best regards,

    Rimmon

     

  • Mysterious Profile Picture
    69 on at

    Hi @v-mengmli-msft ,

    "RITM0338201" this is the substring I need. 

    Screenshot 2024-06-28 125741.png

     

     This is the output.

  • Verified answer
    v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @Mysterious ,

     

    The slice expression should contain position of start character and end character. Reference guide for expression functions - Azure Logic Apps | Microsoft Learn

    Please modify your expression.

    slice('<text>', <startIndex>, <endIndex>?)

    You can also try substring. Reference guide for expression functions - Azure Logic Apps | Microsoft Learn

     

     

    Best regards,

    Rimmon

     

     

  • Mysterious Profile Picture
    69 on at

    I appreciate your help so much @v-mengmli-msft 

  • RT-20121435-0 Profile Picture
    4 on at
    inside the slice expression instead of the start and end index number, you can also use a function called indexof() intead of manually giving index number  to dynamically find the index number. 

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
11manish Profile Picture

11manish 273 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 172 Super User 2026 Season 2

Last 30 days Overall leaderboard