Friday 23 November 2012

Reference external java beans with absolute path

I run a bunch of batch file exports from Salesforce calling Data Loader from the command line, with multiple process-conf.xml files defining various tasks. Originally I stored the SFDC credentials in each bean, then shifted the credentials to variables, still within the same xml file, using java.lang.String classes with constructor-arg properties:

Tuesday 13 November 2012

Case sensitive text searches in SQL Server

Salesforce unique ids are only case insensitive when using the 18 character version with the three additional characters at the end which specify the case of all the previous characters. So when searching for and matching SFDC Ids in SQL Server using the 15 character ids, the result set will often include two or three matches where you were expecting only one.

Monday 12 November 2012

Calculate total length of all cells in a row or column

In Excel the LEN function returns the length of any given cell, but it errors if asked to find the length of an array of cells. E.g. =LEN(A2:Q2) will not return the length of all cells in the given range. In order to find the length of an array of cells you need to enter the formula as an array formula.

Type the same formula into a cell  (=LEN(A2:Q2)) but before hitting [ENTER] hold down the [CTRL] and [SHIFT] keys simultaneously. Excel will bracket the formula in curly braces automatically, you do not need to type the braces in. The formula will look like this:

{=LEN(A2:Q2))} and the cell will display the total number of characters in the selected array of cells.

Big thanks to Guy Parrington for the heads up!