Skip to main content

Notifications

Power Automate - General Discussion
Answered

Slice function

(0) ShareShare
ReportReport
Posted on by 67

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:
  • RT-20121435-0 Profile Picture
    RT-20121435-0 4 on at
    Slice function
    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. 
  • Mysterious Profile Picture
    Mysterious 67 on at
    Re: Slice function

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

  • Verified answer
    Re: Slice function

    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
    Mysterious 67 on at
    Re: Slice function

    Hi @v-mengmli-msft ,

    "RITM0338201" this is the substring I need. 

    Screenshot 2024-06-28 125741.png

     

     This is the output.

  • Re: Slice function

    Hi @Mysterious ,

     

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

    vmengmlimsft_0-1719558879041.png

     

     

     

    Best regards,

    Rimmon

     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,867

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,174

Leaderboard

Featured topics