Figure 1.2: After State=Upper(State)
[space]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.
Figure 2.1: Before Summary=TextFormatRemove(Self)
[space]Note the picture of the state field before and after tabbing out of the summary field.
Figure 2.2: After Summary=TextFormatRemove(Self)
[space]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.
Figure 3.1: Before Summary=TextColorRemove(Self)
[space]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.
Figure 3.2: After Summary=TextColorRemove(Self)
[space]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.
FileMaker 13/12 Certified Developer
The Scarpetta Group, Inc.
[call_two href=”https://scarpettagroup.com/filemaker-contact-us/” label_button=”Contact Us” class=”call-to-action-two” colorstart=”#000000″ colorend=”#FFFFFF” colortext=”#FFFFFF” icon_size=”12″ color=”” align=”vertical” width=”normal” icon=”” ]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![/call_two]