Free Technology Advice Will Cost You

Many IT firms provide “free advice.” They expect you to pay for the hardware and software they recommend but not the recommendation. Skeleton Key takes a unique approach to this. We don’t sell hardware. We don’t sell software. Our value rests in the fact that these factors are not a part of our advice and recommendations. Our advice is free of conflict. Our recommendations are free of subversive intent and self serving motivations. No qualified advice and recommendation is free. If it has value, you’ll pay for it somehow.

I snagged the following snippet of text from an email Oliver Block sent explaining Skeleton Key’s practice of billing for time spent documenting our work and making recommendations.

“In your previous e-mail message you mentioned that you did not realize that Skeleton Key charges for recommendations. In fact, that is exactly what we charge for. Our customers pay us to give them objective recommendations of technology solutions that will give an excellent return on investment. Other I.T. providers give advice away for free while expecting to make a profit on the sale of expensive equipment and software. That advice is usually lacking in technical details and it is shaped by the fact that the expert is trying to sell the products and services that they carry. Our advice costs more than some providers, but it is measured, well researched advice that only considers your needs and return on investment. We don’t provide recommendations as part of a selling process, we provide them as part of our service to you.

“You can take our recommendations and implement them yourself if your staff have the time, e.g. buy the firewall we recommended online at the best possible price and install it per our recommendation. If you would like us to install it, we will of course be happy to provide that service, using the work we performed in making the recommendation as a plan for rapidly implementing the solution. You may even be able to save some money by performing as much of the work in-house as you can and only using us for the the most technical tasks or for advice along the way – that’s fine with us! We’re happy to train and educate your staff as we work so that they can maintain the network without our help in the future.”

Next time you’re given “free advice” ask yourself, “How am I paying for this?” The reality is You get what you pay for. Please, shoot me an e-mail if you’d like to pay for good advice.

The Let Function

Among FileMaker Pro’s many functions, the Let function stands out as one of, if not the most, powerful among them. This article attempts to demystify the Let function and demonstrate examples of its practical use.

Purpose of the Let function


Sets a variable(s) to the result of an expression for the duration of a calculation, script or in the case of global variables, until the file is closed.

Why use the Let function?


  1. Allows the user to assign the results of an expression to a variable and then return a result all within a single function.
  2. Aids in the reduction or elimination of nested and/or repeated expressions and functions which improves readability and performance.

Format


FileMaker Pro 10’s help defines the format of the Let function as such.

Let({[}var1=expression1{;var2=expression2…]};calculation)

From FileMaker’s help documentation the parameters of the Let function are defined as such:

var – any variable name, local variable name or global variable name.
expression – any calculation expression, field or constant.
calculation – any calculation expression, field or constant.

Note: In order to make it more readable I have separated the format into multiple lines. This convention is not required but makes it easier to discuss in this article. Also please note that you can include comments using the “//” characters. I should also note that though FileMaker includes the curly braces in their description of the format “{}” they are not required and are present to denote the option of making multiple variable assignments. If you only have a single variable you can omit the brackets. See the code samples below. Multiple Variable Assignments (include square brackets)

 Let (   [       var1=expression1;       var2=expression2   ];   // This is a comment   calculation ) 

Single Variable Assignment (no square brackets)

 Let (       var1=expression1;   // This is a comment   calculation ) 

Variable Types


It’s important to remember that Let supports three variable types: calculation, script and global.

calculation scope a   – valid for the duration of the Let statement.
script scope $a  – valid for the duration of the calculation in which it is defined or the script in which the calculation is evaluated.
global scope $$a – valid until the file is closed.

The Let statement below illustrates the assignment of each variable type. It is also important to note that even though they all share the name “a” they are NOT the same variable. The absence or inclusion of the “$” or “$$” denote separate variable spaces. So be sure you do not confuse them when you are writing a calculation.

 Let (   [     // assign variables     a = "I am a calculation level variable.";     $a = "I am a script variable.";     $$a = "I am a global variable."   ]; ) 

Basic Use


Here are some examples of the Let statement in use.

Here I assign values to variables a = 1 and b = 2. Then I use the defined variable in a calculation expression a + b. The result of the calculation is returned as the result of the expression. If a = 1 and b = 2 then a + b =3. So the value returned from the Let statement is 3.

 Let (   [     // assign variables     a = 1;     b = 2;   ];   // return the result or use the variable in an expression   a + b ) 

For the next example we will assume the following script steps preceded our Let statement.

 Set Variable [$a;1] Set Variable [$b;1] 

I am using variables that were assigned in the above script steps. $a and $b are set and then used in the Let statement.

 Set Variable [$result;Let (     $c=$a+$b;     // return the result or use the variable in an expression     $c   ) ] 

Use Let to Avoid Nesting


In this example we try a more real world scenario to demonstrate how Let helps us avoid nesting and repetition. First let’s try parsing some text without using the Let function. In this case, we are trying to get everything after the first sentence using the position of the first period (“.”).

 Right ( Sample Data::Paragraph ;
Length ( Sample Data::Paragraph ) - Position (Sample Data::Paragraph ;
“.” ; 1 ; 1 ) - 1)

This calculation statement is difficult to read due to the nested Position and Length functions. It might make sense 6 minutes after it’s written but what about when you come back in 6 days, 6 months or even 6 years later. You’ll have to take a close look at it to understand what’s going on.

Here is the solution using the Let function.

 Let (   [     source = Sample Data::Paragraph;     sourceLength = Length(source);     startPosition = Position ( source ; “.” ; 1 ; 1 ) - 1 ;     result = Right ( source ; sourceLength - startPosition )   ];   result ) 

In this example the statement is longer but is more readable. Each line handles only one function. It can easily be read from top to bottom without the confusion of using nested functions. When you revisit this calculation you won’t be scratching your head trying to remember how it works. You’ll be able to read it.

Use Let to Avoid Repetition


In this example I am creating an expression, part of which I will need to use more than once. Here’s how it works without the aid of the Let statement.

 (Sample Data::Quantity * Sample Data::Amount) -
((Sample Data::Quantity * Sample Data::Amount) *
Sample Data::Discount Percentage )

Again, this statement is hard to read due to nesting. Also notice the reuse of the expression “Sample Data::Quantity * Sample Data::Amount” which appears twice and causes the statement to be longer than it needs to be and contributes to the statement’s cluttered appearance. Another problem is that if we need to change the “Sample Data::Quantity * Sample Data::Amount” expression we’ll need to do so in multiple places.

Now here is the same calculation using the Let statement.

 Let (   [     quantity = Sample Data::Quantity;     amount = Sample Data::Amount;     discountPercentage = Sample Data::Discount Percentage;     subtotal = quantity * amount   ];   subTotal - (subtotal * discountPercentage) ) 

Like the previous example this is much easier to read since each line performs a single function. If you want to change an expression you can do it in one place without having to hunt though the code for duplicate expressions.

Nesting Let Functions


FileMaker Pro will allow you to nest Let statements. However, if you make a calculation scope variable assignment in a nested Let statement it will only be available within the Let statement in which it was defined. If you want to make variable assignments that are available to the outer Let statement then use a script level variable ($var) or a global variable ($$var).

Let (   [     a = 1;     b = Let ([a=0]; a)   ];   a ) 

In the above example the returned result a is equal to 1 even though the assignment was made in the nested Let. The reason is that the “a” used in the nested Let only has calculation level scope and therefore the assignment is only valid within the nested Let statement.

If we change the a to be a script level variable by the use of a single “$” then the returned result will be different.

Let (   [     $a = 1;     b = Let ([$a=0]; $a)   ];   $a ) 

The above example now returns $a as 0. This is because the scope of $a is now at the script level. Any assignment made to that variable will be true until the enclosing script has completed.

Dynamic Variable Creation


When combined with the Evaluate function Let can be used to create variables dynamically.

Imagine you have a table that contains a list of things that you need to reference regularly. These items may not change on a regular basis and might be considered constants. For example you might have a list of strings used for localization within a solution used in multiple regions.

In this case you might want to have constants that are defined at launch time that correspond to the users region.

Imagine you have a table called Strings which contains 3 fields: “Name”, “String” and “Region”. Now imagine that upon launch the system could do a find on the Strings table to get all the strings for a given region.

You could then loop over the records and use a Let statement to dynamically create a global variable to store the constant for each record.

 Evaluate (   "Let     (        [         $$" & Strings::Name & " = " & Strings::String & "       ];      )"  ) 

After this calculation is run on a given record a variable corresponding to the record’s Name field variable will be created. if the record’s name field contains “Welcome” then the variable name would be “$$Welcome” the contents of the variable would be whatever was in the String field.

Given a record with the following data…

Name: Welcome
String: Welcome to XYZ solution!
Region: United States

Would result in the variable “$$Welcome” with an assigned value of “Welcome to XYZ solution!”. The $$Welcome variable could then be used anywhere within the file in which it was set without any regard to context. That is just one example of using dynamic variables. There are many more things you can do, but I’ll save that for a future article.

So go forth, take your new found knowledge and untangle the mess of repetitious, nested calculations lying around in your FileMaker solutions. You better hurry before you forget what they do.

8 Reasons You Need Custom Software

As you survey your business and look at your Profit & Loss report you’ve probably never thought “I wish I could spend $50,000 on a custom software application.” In fact, none of our customers have ever said those words to me. (If you’d like to make my quarter, give me a call and say it right now. 😉)

What you probably have thought recently is more along these lines:

    • Where can I trim some expenses?
    • If we don’t improve our top-line, we’re up a creek. How can we get more sales?
    • We pulled through last year better than expected. How will we capitalize on that success this year?

Our customers answer these questions with software specifically built to deliver results for their business model. If you think custom software is reserved for the Fortune 500 crowd, you’re wrong.

8 reasons to have custom software:

1. Knowledge is power.

      1. A custom software application delivers the information you need to make decisions at the speed of business.

2. Using ‘shrink-wrap’ software is like eating someone else’s leftovers. You don’t get to choose the main course or dessert. You certainly can’t request they ‘hold the onion and go heavy on the garlic.’

3. Focus on your passions. Let’s face it; very few of us love working with our business software. That’s not why you started your company. Custom software automates the repetitive tasks that keep you away from your passion. They let your business focus on building a customer base, serving the customers you have and generating more revenue.

4. Employee satisfaction – including your own. Employees love knowing they work for an organization that’s willing to invest in itself. Right now, finding employees is probably easier than it’s been for decades. That’s not necessarily true for the A+ kind of game-changing talent you’d hire in a heartbeat. These people have choices, even when unemployment rates are at 10%. How much time does your sales team spend on administrative tasks or ‘busywork’? (Add to that the time they spend complaining about those tasks.)

5. Custom software changes the game. Life has rules. If you’re content to follow all of the rules, your success is limited. By what you ask? By whoever wrote the rules. It’s your company. It’s your life. You write the rules. You make it so. The software you choose is a critical element in fulfilling your drive to innovate and lead, instead of follow.

6. Your competition – what competition? Building software creates an immediate edge over the competition. Let them struggle with leftovers. Let someone else figure out a ‘work-around.’ You draw a straight line to the bottom of your P&L statement by turning wasted time into profit.

7. Your customers will love you for it. What’s your value proposition? What if you can double that? Triple it? The Law of Value as defined in The Go-Giver says, “Your true worth is determined by how much more you give in value than you take in payment.” What are you losing right now because your employees can’t answer customer questions quickly? Drive customers’ perceptions of value by delivering more, faster and better.

8. Your family will love you for it. Well at least they’ll see more of you. We’ve confronted customers with the fact that there’s no direct ROI for specific functions they are requesting and heard them say, “Yeah, I know; but it’ll get me home in time for my kids’ soccer games.” We can’t calculate that value for you but you should glance at that picture on your desk and think about it for a minute.

In case you’re wondering, SK offers a free initial consultation. We focus on understanding your company, seeing your vision (or helping you define one), and giving you a taste of what it’s like to work with professional software developers. If you’re interested shoot me an e-mail. Let me know when you’ll have 30 minutes to discuss your thoughts.