Cleaning Input Data

Download Video

Users make mistakes. There’s no doubt about that. When given the opportunity, they’ll enter characters and text strings you never expected.

The easy solution to this problem is to simply control the result of what they’ve input. When capturing the input, there may be a variety of rules regarding how you want the data stored.

Do you want to store “4 pm” or 16:00:00? Is the user entering suffixes such as Jr. or Sr. into the last name field or the first name field? Should the input be super simple for an iPad and just happen within one field?

Making the input process easy, yet conforming to your storage rules is often desirable. So is performance! Do you know the performance impacts of that auto-enter calculation versus simply using a script trigger?

This video is all about cleaning up your data input. As a user adds data to the database, you can take the necessary steps to make sure it’s exactly what you want - the low impact way.

AttachmentSize
CleaningInputData.zip273.33 KB
Tags:

Comments

Hi Matt,

Between 12:45 and 13:33 you seem to state that Auto-Enter calculations incur a performance overhead whenever the field is referenced in some way. Is this really the case? I had assumed that the calculation was only reapplied whenever a change was made to the field itself or a field within the calculation.

Can you please clarify?

Thanks,

Juerg

You are correct. An auto-enter calc will only evaluate when itself or other fields which it references are modified.

However, what seems to be "implied" is that because FileMaker has to account for "all things" if you have 1000 fields and 100 of those have auto-enter calcs then FileMaker must "evaluate" if it needs to evaluate something within those 100 calcs.

The point being, if you can get away with NOT using the auto-enter to enforce data entry formatting rules then you're better off with using a script trigger if the particular input field only shows up in a few places in your solution.

What this does is keep your schema extremely clean and you don't suffer from auto-enter "side effects" such as slower import times.

The information is mostly for solutions which have extremely high field counts. If you are keeping your tables very narrow, then you'll be hard pressed to notice the impact in many cases. When routine importing is a concern then keeping your auto-enter calcs low is preferred over using script triggers for simply cleaning data.

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Matt, New Subscriber here and I LOVE your videos. I love that your script removes trailing return carriages ( or anything else after the first line). My users never cease to amaze me and I see leading return carriages often which results in a blank field with your script. Is there a way to ignore leading return carriages? Obviously, if there were any other characters, it would consider that first line. That cannot be helped. Thanks!