Introduction

Spindle Professional requires mandatory data to generate the PayThem URL which overlaps the PayThem button placed on Invoices to allow customers to pay using the SagePay gateway. Some fields are limited to the number of characters allowed to be proces. This can cause issues when fields like 'Billing FirstName' and 'Billing LastName' which are limited to 20 characters, contain more than one name e.g. Alice Sample\Bob Everyman. This can also be a problem when a name is quite lengthy. This guide contains steps to workaround this without the need to modify the data in the field that's tripping up Spindle. Sage report designer provides the Substring function in its expression objects. We can use this to limit the number of characters Sage displays in the string.

Versions Applicable

  • Spindle Professional 6.13, 6.14, 6.15
  • Spindle Document Distribution v7+

Resolution

1. Open the Sage layout for the document you want to print to Spindle Professional

2. Add an expression object to the report. An expression object is required for dynamic data to be pulled through from the database

3. In the right hand pane, under the category Function > String, double-click on the function Substring

4. Using the substring syntax below, adapt it to the field that's causing the issue

Substring Syntax

“Substring(“Sage field to pull through the string from”,”start substring from”,”number of chars in substring”)


Example Expression including Spindle Documnet Distribution commands


"##VAR20 " + Substring("SLCustomerAccount.AccountName", 0, 20) = "##"


Related ProductSpindle Professional
Ref NumberKBA-01-02-018
Document Date23/11/2016
Original AuthorZak Rangara
Document Versionv1.1
Last updated 30/11/2017
Update Author Vince Hodgson