IsFilled ( )

Function stats

Average user rating
166
262
9999
Support
FileMaker 7.0 +
Date posted
16 July 2010
Version
1
Recursive function
No

Author Info
 Josh Ormond

3 functions

Average Rating None

author_avatar



 

Function overview

Prototype

IsFilled  ( field )


Parameters

field  Input the field name you are testing.


Description

Tags:  Not IsEmpty   IsEmpty  

This is a really, really simple function...but I still see a lot of questions asking how to test if a field has data in it.

The not operator is easy enough to type in, but why should I have to?

Examples

Sample input

IsFilled ( TableName::FieldName )
IsFilled ( "" )


Sample output

1 (Returns a true value if FieldName has data in it)
0 (Returns a false value if FieldName is blank or has no data)

 

Function code

not IsEmpty ( field )

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/262

    Prototype: IsFilled( field )
    Function Author: Josh Ormond (http://www.fmfunctions.com/mid/166)
    Last updated: 16 July 2010
    Version: 1

*/
// ===================================

 

Comments

uLearnIT
26 July 2010



See also the Exists function posted here by yours truly.
Mine has curiously been very lowly rated - possibly by people not understanding the extreme utility of such a function.
  General comment
Josh Ormond
20 August 2010



Thank you sir. You know I was looking for that on FMT, but couldn't put my finger on it.
  General comment
Fitch
21 August 2010



The reason functions like this are low rated is that IMHO they really don't have much utility. How hard is it to use "not IsEmpty()" or IsEmpty()=0" ? I suppose it's partly a matter of taste, but that to me is another part of the argument against it: I might like to do things a certain way, and put my own wrappers on standard functions, but how is that going to fly with the next developer who comes along to work on this project? If I'm going to code things in a non-standard way, I should have a compelling reason.

This is not meant to be a personal attack, and I do appreciate your taking the time to post your work.
  General comment
Josh Ormond
26 August 2010



Appreciate the input Fitch. I make it a point to avoid viewing anything people say as a personal attack. I don't wholly disagree with you. There are a lot of strange custom approaches that I've seen with every aspect of FileMaker, not just Custom Functions, and I'm sure you have seen a 1000 times more than I have.

I guess I look at a custom function the same way I look at the Let statement. You can set Local and Global variables from inside a calculation without using the Set Variable script step. In principle, I suppose the two ideas are at least similar. The idea being making the actual calculation simpler. For me, that has been extremely beneficial especially when using the Web Viewer to calculate totals (without using a field). It also gives you the ability to fix a calculation in one place rather than 100's. Not that there would really be anything else to add to this specific CF...but you never know. Some fresh-minded crazy may come up with something that works better than the "not" operator...and revolutionize the way we develop (I know, far fetched...but the principle is what I'm driving at). And then I would only have to change how my CF works, and my entire solution is updated.

As for other developers working on the solution... Anytime I have started work on another developers project, I have always printed (or saved as PDF) the custom functions, field definitions, and scripts so I can access them without leaving what I am working on. Studied them. And moved on with whatever adjustments I needed to make. Since I have already gotten a sense of how the previous developer orchestrated the solution, it hasn't really slowed me down at all. With a few exceptions.

But I do agree, CF's like this will probably always be rated lower. But that's ok. While it has very little utility to many developers, it does still have the potential to make many calculations easier. Especially since FileMaker is used by far more people than seasoned developers. Plus I am very keystroke oriented. If I can develop a solution more efficiently by shortening every calc I write by 3-5 keystokes, I can finish that project hours/days/weeks faster. But that is probably the Borg nano-probes talking.
  General comment

 

 

 

 

 

Top Tags

Text Parsing  (33)
List  (32)
Date  (28)
XML  (27)
Format  (23)
Sql  (22)
Dev  (20)
Debug  (17)
Interface  (15)
Layout  (15)
Text  (14)
Variables  (13)
Filter  (12)
Layout Objects  (11)
Design  (10)
Array  (8)