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
   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

 

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