Skip to main content
Community site session details

Community site session details

Session Id : +97xXeb/V+Q/y7iVhuIQYQ
Power Automate - General Discussion
Unanswered

Need last 4 Characters of a Tracking Number as Output

Like (0) ShareShare
ReportReport
Posted on 7 Dec 2021 20:40:59 by 147

Currently I have 2 lists with a column called "Tracking#" on both lists and the idea is that I want to take for example "123344455" and extract the last 4 digits (in this case 4455) and use a create and update to dump the value into another column called "Tracking Last 4). Can anyone assist in how I would be able to achieve this?

Any further help is always appreciated.

 

Thanks,

y2kardell

  • y2kardell Profile Picture
    147 on 08 Dec 2021 at 12:15:58
    Re: Need last 4 Characters of a Tracking Number as Output

    @jinivthakkar  @VJR  thanks for the suggestion, but maybe I need to clarify exactly what is needed. The user fills out the shipping form columns in SharePoint with their name address, phone number....etc. In the mean time there are other columns called ' Tracking #' and 'Tracking (Last 4)'. 

    WhatI I am trying to accomplish is....when the approver goes back on to edit the initial request from the shipper to fill in the ' Tracking #' column with the FedEx tracking number - I need to somehow take that value whatever it may be and truncate it somehow to show the last 4 in the Tracking (Last 4) column in SharePoint.....so that when I choose Create/Update item action in Power Automate it will populate the Tracking # (Last 4) column in the SharePoint list. Hopefully this better clarifies things. 

  • VJR Profile Picture
    7,635 on 08 Dec 2021 at 11:02:10
    Re: Need last 4 Characters of a Tracking Number as Output

    Hi @y2kardell 

     

    Multiple ways to do this.

    Below is using in-built substring action.

     

    Expression used:

    sub(length(triggerBody()['text']),4)

    The blue portion is the input from where your string is coming.

     

    VJR_0-1638961146169.png

     

     

    After running the process:

     

    VJR_1-1638961275239.png

     

  • jinivthakkar Profile Picture
    4,181 on 08 Dec 2021 at 09:16:11
    Re: Need last 4 Characters of a Tracking Number as Output

    @y2kardell try this 

     

    substring(outputs('Compose_4'),5,4)
     
    Compose 4 -  string(123344455)
     
    Output :  4455

    --------------------------------------------------------------------------------

    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete