web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Substring Transformation based on spaces

(0) ShareShare
ReportReport
Posted on by 5

Hello,

I'm trying to streamline by bank import process. My bank's CSV (Barclays) gives me one description field that concatenates a few fields together with multiple blank spaces, For example, the value in the CSV might be "B SMITH              EXPENSES           FT" which I want to split into 2 fields ("B SMITH" and "EXPENSES")

I've tried using the Substring Transformation Type with the following variables:

Start Position: 1

Ending Text: "  " but without the inverted commas..i.e. just two spaces

Nothing in Starting Text or Length

Next Transformation Rule: Trim (have tried without this and it still doesn't work)

When I run the Test on the above sample text, it works perfectly. However, when I run the Bank Statement Import, the mapped fields are always blank. I've tried using different triggers rather than the two blanks (i.e. in this example, change the Ending Text to "EXP") and that works perfectly. So it's something to do with the double spaces

Any ideas how to get around this?

Thanks in advance

I have the same question (0)
  • Suggested answer
    keoma Profile Picture
    32,729 on at

    split the string with "  " (2 spaces) using e.g. text.split. trim all resulting strings in the collection, remove the empty strings.

  • James123 Profile Picture
    5 on at

    Hi, thanks for the response but I'm not sure I understand. There are 12 Transformation Types (including Custom) but none of these are text.split.

    Even if there was, I've already shown that "  " (2 spaces) doesn't work when looking for a string..I'm after the way to get BC to recognise "  ". Sometimes in Excel, you need to use the CHAR(32) to produce a space so wondering is there's anything similar for BC?

    Sorry, probably me not understanding.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,066

#2
YUN ZHU Profile Picture

YUN ZHU 658 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 595

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans