Login / Register  search  syndication  about

          Jason Buss' Blog

Jason Buss on SalesLogix development & customization, SQL, and more.

Useful Functions from the SLX_Common script (SalesLogix LAN)

The SLX_Common script included in SalesLogix contains a number of simple, yet useful, functions that you can use within your own functionality to save yourself some time by not having to reinvent the wheel each time you need some simple functionality.

  • GetItemIndex(Control, Value)
    • This function returns the index for an item within a control such as a ComboBox, CheckListBox, ListView, ect.  Basically, any control with an "Items" property.
  • SLXIsNumeric(Value), NulltoZero(Value), CheckForNull(Value), CheckForNullDate(Value)
    • This series of functions can be used to evaluate a number of different datatype for null or blank values.

There are a number of functions to provide some basic calulations commonly performed against currency values:

  • CalculateAdjustedPrice(Price, Discount)
  • CalculateDiscountPercentage(AdjustedPrice, PriceBase)
  • CalculateExtendedPrice(AdjustedPrice, ExchangeRate)
  • CalculateLocalPrice(AdjustedPrice, ExchangeRate)
  • CalculateExtendedPriceLocal(Quantity, PriceLocal)
  • ExtendedPricetotal(objRS)
    • ExtendedPriceTotal will total up all records from the passed recordset, where the fieldname is "Extended")

There are also a couple of scripts to help with SQL statements:

  •  GetSQLConditionClause(Index, strFltText), GetSLXConditionClauseEx(Index, strFltText, strField)
    • The Index number passed corresponds with the type of query to run... (0 = Like with wildcards, 1 = Like, 2 = Equals To, 3 = Not Equal To, etc...)
  • AddToWhereClause(Field, Clause, Where), AddToWhereClauseEx(Field, Clause, Where, Condition)
  • AddCommaDelimatedTextToWhereClause(intCauseIndex, strWhere, strText, strField)
etc...

This is just a short list of some of the functionality available in this particular script.  Other useful functionality is available in this, as well as many other scripts which are included within SalesLogix.  In addition, if you're relatively new to VB scripting, these scripts provide some invaluable examples for how Subroutines and Functions can be built within the SalesLogix client.

  Jason

What's This?
  
Bookmark and Share

About Jason Buss

   Jason is a senior application developer with Customer FX.



Related Content
   Saleslogix Xbar update coming soon
Scheduled to be released 8/29/2014 Features in Update •Installation improvements •Enterp
Posted on Aug 21, 2014 by Scott Weber to SalesLogix Product Blog
 
   How do you add a parameter for File Attachment Size and Timeout in Saleslogix 8.1?
Question: Is it possible to set a parameter for file attachment size and timeout in Salelogix? If
Posted on Aug 07, 2014 by Dale Richter to SalesLogix Questions & Answers
 
   Fixing Duplicate Saleslogix FieldIndex Values in the SECTABLEDEFS
I had to fix a client's SECTABLEDEFS table that contained duplicate FieldIndex values.  FieldInd
Posted on Aug 07, 2014 by Kris Halsrud to Kris Halsrud's Blog
 
   Saleslogix XBar Installation
When installing the new XBar application I found the instructions a little vague so I thought I would pas
Posted on Jul 18, 2014 by Mark Duthoy to SalesLogix Support
 
   Using an Array - SQL vs Crystal.
In data, an Array is used to store multiple values in a single variable.  I often use Arrays to qual
Posted on Jul 17, 2014 by George Jensen to George Jensen's Blog
 
Comments

 

Twitter Trackbacks for Useful Functions from the SLX_Common script (SalesLogix LAN) - Jason Buss' Blog [customerfx.com] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 Useful Functions from the SLX_Common script (SalesLogix LAN) - Jason Buss' Blog         [customerfx.com]        on Topsy.com

July 19, 2010 8:54 AM
 

Jason Buss' Blog said:

I've previously posed about a number of useful functions available to you within the SLX_Common script in the LAN version of SalesLogix. I'd like to go a little further in-depth about a couple of functions which are helpful for creating new SQL

September 20, 2010 3:48 PM

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