Login / Register  search  syndication  about

          George Jensen's Blog

George Jensen on Reporting, Business Intelligence, Crystal Reports, Visual Analyzer, and more.

Working with Left and Right String Functions

Continuing on working with the functions in Business Objects Crystal Reports I thought we could look at the Left and Right functions.  I know to some of the readers this may be some simple stuff but remember I try to write to new users of Crystal and SalesLogix reporting.

When I think of working with these function the first thing that comes to my mind is the military.  While serving in the National Guard I have had the opportunity to use these functions in script in creating reports.  By regulation a Soldiers social security number is used as a unique identifier.  The military is trying to be smart and not throw this important id number on the many lists they deal with everyday so they often use what is called a laundry mark.  

A laundry mark is a combination of the soldiers first initial of the last name and the last four of the SSN.  To programmable call the laundry mark out of data we can use the Left and Right String functions.  For our example we will use the Sage SalesLogix Contact tables Last Name and Work Phone.  To display this data in Crystal we would create a formula field called Laundry Mark.  

When the Field Formula Workshop opens look for the Function Tree.  If the Function Tree is not displaying select the Alt and U keys.  Navigate to the String Value in the Function Tree and click on the plus sign next to it. 

 You can see the Left value in the list, the right is a little further down but the process is the same for each.

Left (str, length)

There are two parameters for these function, the first is the string.  If you are using a integer or double field type you would have to convert the field to a string.  Both of our fields are string fields.

The second parameter is the number of characters from the left you want to collect.  For lastname we only need first character but for the workphone we will use the last four characters.

Our formula for LaundryMark field would look something like.

Left(lastname, 1) & Right(workphone, 4)

The data will look something like this when inserted into your report.

J0214

We will go into the Conversion next.

Remember our list of free SalesLogix Reports

 

 

 

What's This?
  
Bookmark and Share

About George Jensen

   George Jensen is a Senior Developer for Customer FX Corporation.


Related Content
   Infor CRM (formerly Saleslogix) Web- Dependency Lookup OnChange Event Not Working Correctly
In the Saleslogix 8.1 web client the dependency lookup still has a problem with the OnChange event. 
Posted on Nov 26, 2014 by Kris Halsrud to Kris Halsrud's Blog
 
   Confirming Actions With an "Are you sure?" Prompt in Infor CRM (Saleslogix)
I'm not a huge fan of bugging end users. I figure, if an end user clicked something, he or she meant
Posted on Nov 18, 2014 by Ryan Farley to Ryan Farley's Blog
 
   Infor CRM (formerly Saleslogix) Statement of Direction
Learn more about the future of Infor CRM. Recently I received my login information for the Infor Partn
Posted on Nov 13, 2014 by Brianna Ojard to The Inbox
 
   Xbar for InforCRM (formerly SalesLogix) Installation Issue
After installing Xbar 1.1 on a Windows 2008 R2 server the Xbar application was not available in Outlook 2
Posted on Nov 11, 2014 by Mark Duthoy to SalesLogix Support
 
   Programmatically Using Security Roles and Secured Actions in Infor CRM (Saleslogix)
In most places in the Infor CRM (Saleslogix) web client, it's pretty easy to use security roles. You
Posted on Nov 07, 2014 by Ryan Farley to Ryan Farley's Blog
 
Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add
All contents Copyright © 2014 Customer FX Corporation
Customer FX Corporation
2324 University Avenue West, Suite 115
Saint Paul, Minnesota 55114
Tel: 800.728.5783

  Follow @CustomerFX on twitter
Follow the best news, tips, and articles
  Subscribe to Customer FX on youtube
Watch SalesLogix tutorial videos from Customer FX
Login / Register