Log in
Hot & Trending on FMT

Text Formatting Using Auto-Enter Calculations in FileMaker

Featured Text Formatting Using Auto-Enter Calculations in FileMaker

What you should know before reading this post:

  • Be familiar with the FileMaker software
  • Know how to add an Auto-Enter Calculation

Auto-Enter Calculations can make your solution easier to use and defend your solution’s users from unintended problems with their data.

This week, I will share with you three simple, easy to use FileMaker functions that can be used with Auto-Enter Calculations (aka Auto-Calcs). This post will review text formatting using Auto-Enter calculations in FileMaker. This post will be part of an ongoing blog series reviewing key functions in FileMaker.

Function Review #1: Text Formatting to Uppercase

There are many functions that are helpful in making our solutions more user friendly. The UPPER function is one of those. It could be used in excess and be too much, but in just the right places it’s perfect.

For example, one instance where it could be used and benefit your solution is auto capitalization of the state field (AL, AK, AX, AR, CA, CO, etc.) where address/location information is.

As an example, I will use the Invoices FileMaker starter solution during this blog post. The state field starts as a simple text field. Now, we will be adding an Auto-Enter Calculation to that field. The Auto-Enter Calculation we will use is “State = Upper (State)”. This calculation will help to always have the state abbreviation capitalized.

Note in Figure 1.1 the user is active in the state field and enters a state’s (South Carolina) abbreviation using lowercase. Now, note in Figure 1.2 we have tabbed out of the field. Notice how the State=Upper(State) function applied to the state field automatically corrects any and all text entered into the field to be uppercase.

Text Formatting Using Auto-Enter Calculations in FileMaker, Field Before Function State=Upper(State) is Applied

Figure 1.1: Before State=Upper(State)

Text Formatting Using Auto-Enter Calculations in FileMaker, Field After Function State=Upper(State) is Applied

Figure 1.2: After State=Upper(State)

I know, I know, to many calcs slows things down, right.  This is an over simplification of an Auto-Calc and may not be the perfect example. For the end user, Auto-Calc’s may speed things up and make the application easier to use. In this case, the Auto-Calc helped to format the state abbreviation by capitalizing it, therefore making the company address properly formatted. A user might type “sc” for ease of entering data. With this Auto-Calc your data will be properly formatted to “SC” and when used in the correct instances.

 

Function Review #2: Text Formatting to Remove Multiple Font Sizes and Colors

Let’s try another example of an Auto-Enter Calculation. This time we use it to add Summary=TextFormatRemove(Self).

This Auto-Calc is useful in the event that an end user copies and pastes information from an outside source into a field within their solution. Copying and pasting text from an outside source can carry over the text formatting from original source. This results in messy, unwanted formatting and problems for the end user of your solution.

Again, we use the Invoices starter solution for this example. The Invoices Detail view provides an invoice summary field. I have added an Auto-Enter Calc,  Summary = TextFormatRemove (Self), to this field.

Text Formatting Using Auto-Enter Calculations in FileMaker, Field Before Summary=TextFormatRemove(Self) is Applied

Figure 2.1: Before Summary=TextFormatRemove(Self)

Note the picture of the state field before and after tabbing out of the summary field.

Text Formatting Using Auto-Enter Calculations in FileMaker, Field After Summary=TextFormatRemove(Self) is Applied

Figure 2.2: After Summary=TextFormatRemove(Self)

Again, no one is suggesting over using Auto-Enter fields with calculated values.  But use of Auto-Enter Calculations and functions in the correct instances can add great value to your solution. The users of your solution will never know the thought and planning of such small details you put into the solution to benefit them. What they will know is that your solutions are easy to use and are less prone to data problems.

Function Review #3: Text Formatting to Remove Colored Fonts

The function I will demonstrate here is “Summary = TextColorRemove (Self)”.

As you can see in Figure 3.1 there are multiple colors across the normal 14 point text in the invoice summary field. This makes the text hard to read. Let’s go ahead and remove the colors that are not black. We can do this by using FileMaker’s Text Functions.

Text Formatting Using Auto-Enter Calculations in FileMaker, Field Before Summary=TextColorRemove(Self) is Applied

Figure 3.1: Before Summary=TextColorRemove(Self)

After application of these functions the text was again pasted into the summary field and was returned to normal 14 point text with all color removed.

Text Formatting Using Auto-Enter Calculations in FileMaker, Field After Summary=TextColorRemove(Self) is Applied

Figure 3.2: After Summary=TextColorRemove(Self)

We could continue the examples with TextColor, TextFont, TextSize, TextStyleAdd and on down the line. With Auto-Enter Calculations and functions applied to the correct fields, you can add value to your solution and protect your solutions from unwanted data additions.

Many times it is not the ultra-technical tricks that make your FileMaker solution a pleasure to use. We think your FileMaker Solution users will thank you for the extra thought, polish, and attention to small details.

Used properly, they will increase your user’s experience.

Look for future posts on function reviews. I like to be an efficient, smart developer and will share with you what I’ve found helpful to me.

 

Bob Kelley
FileMaker 13/12 Certified Developer
The Scarpetta Group, Inc.
This email address is being protected from spambots. You need JavaScript enabled to view it.

Like this post? Let us know. Share the functions you’ve found extremely helpful. We’ll review them in a post to share with others!

The Scarpetta Group

The Scarpetta Group, Inc. is a Platinum FileMaker Business Alliance Member, specializing in custom FileMaker solutions for desktop, iOS and web. Our expertise is understanding our clients’ needs and translating their requirements into successful software solutions that enhance their business, improve efficiency and streamline workflows. We accomplish this through years of project management, diverse skill sets and industry experience.

Whereas many development firms handle only FileMaker development, we leverage our web development strengths and vast knowledge of bringing FileMaker to the web to set us apart. With more than 15 years of experience, The Scarpetta Group has completed countless projects for small businesses to international Fortune 500 companies. These projects have ranged from single iPad applications using FileMaker Go to 100+ user management systems, CRMs, Content Management Systems, Custom PHP APIs and complex web applications.

In the last five years, The Scarpetta Group has grown from a single employee and a team of subcontractors to five full time developers and a team of subcontractors. In 2013 The Scarpetta Group began hosting a FileMaker Pro User Group that has proven to be very successful and considered to be one of the larger user groups in the Southeast.

No matter what data challenges your company faces, The Scarpetta Group has the expertise to lead you in the right direction with your data management and get your company on the road to efficiency. Contact us today.

Website: scarpettagroup.com