Skip to content


Tech Tuesday: SmartConnect – Calculated Fields and Strings

Our Senior Consultant, Chris Hanson, is up for this week's Tech Tuesday on SmartConnect:

One thing I run across a lot is what happens when using calculated fields to manipulate strings within SmartConnect. Most of the time everything works as expected, but occasionally it’ll appear that the calculated field isn’t doing what it is supposed to when trying to run compare, concatenate, index, etc. commands.

What I am referring to is the situation where the string has padded characters on the end of it, so the data doesn’t stop where you expect it to. The biggest culprit is actually GP, almost any field you pull out of GP that is a string will have white spaces padded to the end due to the data types GP uses to store the data.

The easiest example is pulling out a first name and a last name from GP and trying to concatenate them together to send to another system or out to a file. If your source fields are named FRSTNAME and LASTNAME this is what your calculated field might look like if you are not aware of the additional spaces:

Return _FRSTNAME & " " & _LASTNAME

That calculated field would return something close to this result:

Chris                                                               Hanson

What should be done is a Trim statement should be applied to each field:

Return _FRSTNAME.Trim() & " " & _LASTNAME.Trim()

That would give us the expected space between the names without all the additional characters. The Trim statement should be used anytime you are not sure if there are trailing white spaces on the fields you are going to be using within a map or calculated field to ensure you are working with just the data you want.

Have something you'd like to see featured on our next Tech Tuesday? Email us at!

Leave a Comment


Tech Tuesday: Building My First Matrix Report
Overcoming the Top Challenges of Zendesk Integration
Accessing Historical Dynamics GP Data in NetSuite: Using Popdock
Popdock's Top 10 New Features
New Webinar: Getting Started with Matrix Reporting in Popdock


2016 SmartConnect Integration Bootcamps
Tech Tues: Automatically refreshing Pivot Tables in Excel Refreshable Reports
Happy Thanksgiving from the eOne team!
2017 SmartConnect Integration Bootcamps
New Releases of Extender and SmartList Builder



Business Central CRM D365 Business Central Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News error Error Message Events Excel Excel Report Builder Extender Flexicoder GP integration Map Microsoft dynamics crm Microsoft Dynamics GP Navigation List Builder Office Relationships Partner All Hands Call Popdock promotions release SalesForce SmartConnect SmartConnect Bootcamp SmartConnect Maps SmartConnect Office Hours SmartList SmartList Builder SmartPost SmartView SQL Tech Tuesday Templates training Zendesk

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.