Skip to main content
May 18, 2025
Question

Trimming long text string in Appian

  • May 18, 2025
  • 3 replies
  • 0 views

How to trim this text:

"UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_Integral_-_MARSHA_BISHOP_-_banking-mb_jfblaw.ca"

to 

Integral_-_MARSHA_BISHOP_-_banking-mb_jfblaw.ca

    3 replies

    stefanhelzle0001
    May 19, 2025

    Split by the "_", then take the last few items, and add the "_" again.

    harshas2775
    May 19, 2025

    Text functions can help you achieve this. One of the way is below. Depending on format you might need to adjust it further using other functions. As, for the question above, this will work. 

    right(local!text,(len(local!text)-find("_Integral",local!text)))

    May 20, 2025

    [mention:eab6b26bc28e41308eb1c9570937ce1b:e9ed411860ed4f2ba0265705b8793d05] let me know if this works for you.

    regexreplaceall(
      "UDI_1_592268_",
      "UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_UDI_1_592268_Integral_-_MARSHA_BISHOP_-_banking-mb_jfblaw.ca",
      ""
    )