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 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:
I have the same question (0)
  • v-mengmli-msft Profile Picture
    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
    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

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard