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
   Mobile 3.0.3 for Saleslogix v7.5.4, v8.0.0 & v8.1.0 is now available!
Saleslogix Mobile v3.0.3 is now available in the customer portals. This update addresses all issues int
Posted on Apr 14, 2014 by Scott Weber to SalesLogix Product Blog
 
   Editing Filters in Saleslogix Web Client 8.0
Is it possible to add or remove Saleslogix filters from the List view in Accounts?
Posted on Apr 08, 2014 by SalesLogix Support to SalesLogix Questions & Answers
 
   Creating a Unique Saleslogix table ID in a SQL Function
A couple of months ago Ryan Farley wrote an article about how to use a SQL stored procedure to create a S
Posted on Mar 25, 2014 by Kris Halsrud to Kris Halsrud's Blog
 
   Saleslogix Integration with Google - WOW!
Saleslogix will be releasing their Google Integration this month and from what I have seen, it is fantast
Posted on Mar 18, 2014 by Scott Weber to SalesLogix Product Blog
 
   Global Joins in the Saleslogix Web Client
Question: How can I make a Global Join stick in the Saleslogix Web Client? Currently, when I create a
Posted on Mar 07, 2014 by SalesLogix Support to SalesLogix Questions & Answers
 
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