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
   How do I fix a corrupt Picklist in Infor CRM version 8.1?
I had a user ask how to fix a corrupt picklist. The picklist did not show any values when trying to e
Posted on Feb 06, 2015 by Dale Richter to Infor CRM Questions & Answers
 
   Creating a Searchable & Filterable ComboBox in Infor CRM (Saleslogix) Web Client
I've had a few posts lately covering the ComboBox control in the Infor CRM (Saleslogix) Web Client. T
Posted on Feb 05, 2015 by Ryan Farley to Ryan Farley's Blog
 
   Limiting the Height of the Infor CRM (Saleslogix) ComboBox Popup
In my last post, I discussed how the Infor CRM (Saleslogix) ComboBox is a Dijit Select form widget. This
Posted on Jan 29, 2015 by Ryan Farley to Ryan Farley's Blog
 
   How to Disable the ComboBox Control in the Infor CRM (Saleslogix) Web Client
There's a problem with the ComboBox control in the Infor CRM (Saleslogix) Web Client. It won't di
Posted on Jan 22, 2015 by Ryan Farley to Ryan Farley's Blog
 
   Problems running Crystal Reports in the Infor CRM (formerly Saleslogix) LAN client
We recently had a client that was using the Crystal RDC object in VBScript within the LAN client to run a
Posted on Jan 20, 2015 by Kris Halsrud to Kris Halsrud's Blog
 
Comments

 

Georg Jensen Click And Collect | Click and Collect said:

Pingback from  Georg Jensen Click And Collect | Click and Collect

February 22, 2015 11:20 PM

Leave a Comment

(required)  
(optional)
(required)  
Add
All contents Copyright © 2015 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