FieldType( fileName ; fieldName)
All Current Versions Of FileMaker
Returns A Text Result
The FieldType design function is used to a return information about a field that you might find in the Define Fields dialog box. This is one of those design functions that returns multiple pieces of information separated by a space character. In the case of the field type function, it will return four different pieces of information. So it looks something like,
this field has
aboutThis1 (space) aboutThis2 (space) aboutThis3 (space) aboutThis4
aboutThis1 - tells you something about the storage of the field such as if it is a global, summary, unstored calculation, stored calculation or just regular.
aboutThis2 - tells you the type of field such as text, number, date, time, timestamp or container. It does not tell you if the field is a calculation field because that is told you in aboutThis1. However, it will tell you if the calculation result itself is set to text, number, date, time, timestamp or container.
aboutThis3 - is about indexing and returns that it is not indexed (unindexed) or is indeed indexed.
aboutThis4 - returns the number of repetitions for the field evaluated.
The fieldname parameter has to have the name of the field entered in within quote marks.
So here are some examples I pulled right from my article database...
FieldType ( Get ( FileName ) ; "Blog" )
Standard Text Indexed 1
FieldType ( Get ( FileName ) ; "Blog Title Calc" )
StoredCalc Text Unindexed 1
FieldType ( Get ( FileName ) ; "g_examplehypertextcalc" )
UnstoredCalc Text Unindexed 1
FieldType ( Get ( FileName ) ; "blog_IMAGES::linked images" )
Standard Container Unindexed 10
In the last example, I’m looking at a related field. So I need to add the name of the related table occurrence in the parameter "blog_IMAGES::linked images".
© 2010 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. FileMaker Pro is the registered trademark of FileMaker Inc.