Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Amending a string

    Posted 06-05-2025 19:11

    David_Hawken | 2022-03-24 08:02:40 UTC | #1

    I'm looking to amend a string that we will receive from customers. The scenario is that we will ask the customer for the first part of their post code - in the UK, a post code is either 6 or 7 characters long. If it's 6 characters, the format is 3+3 and if it's 7 characters, it is 4+3. We would have post codes in a data table and then see if it's a match or not.

    We need to account for customers that give us the whole post code. What I'd like to do is strip the last 3 characters off of those post codes, leaving us with the first 3 or 4 characters. So if a customer says TA1 1AA, we get left with TA1. Could someone suggest an expression that would help me do this please?


    MelissaBailey | 2022-03-24 14:12:15 UTC | #2

    If(Length(Slot.ZipCode) >= 6, Left(Slot.ZipCode, Length(Slot.ZipCode)-3), Slot.ZipCode)


    system | 2022-04-24 14:12:17 UTC | #3

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 14022