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 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
 
   "Saleslogix’s affordable pricing and usability allow the product to rise above competitors in the space" - Info-Tech Research Group, Inc.
"SalesLogix’s affordable pricing and usability allow the product to rise above competitors in the sp
Posted on Jul 14, 2014 by Scott Weber to SalesLogix Product Blog
 
   Saleslogix Default Group Layout
How can I default the formatting of columns in my Saleslogix groups?
Posted on Jul 03, 2014 by Dale Richter to SalesLogix Questions & Answers
 
   Changing Contact Process Statuses in Bulk
Recently, I was asked if it was possible to cancel a group of running contact processes.The answer is yes
Posted on Jun 30, 2014 by Kris Halsrud to Kris Halsrud'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