Best Default Fields

When you consider every little action you take while creating any type of software, if you add all those actions up, you can end up with a lot of extra repeated steps.

In consideration of all the fields you may be creating for various utility purposes, along with your normal data fields, it's always a nice idea to take advantage of features which may save you those little bits of time.

In this video, and the provided sample file, you'll benefit from using FileMaker's somewhat hidden feature of Default Fields. You can easily create your own set of desired default fields. And, using the provided file, you can easily switch between these various sets of default fields. I also provide my own personal list of desirable default fields.

Plus, if you've not used the FileMaker 18+ feature of writing file data out, then you'll get a double benefit from this technique file and video. You'll be learning how to use the FMDefaultFields.xml file and how to manage a collection of settings which you can custom tailor for your own needs.

AttachmentSize
DefaultFieldsInstaller.zip96.4 KB

Comments

trying to create a default field equal to 1.

<Field DefaultStyle="" id="13" name="zConstant" fieldtype="Calculated" datatype="Text" comment="Constant=1">
<LanguageReference name="English" id="21"></LanguageReference>
</Storage>
<Text><1></Text>
</Field>

What would go in between the <text>s?

Jonathan Marcus

An unstored calc would use this text tag.

<Text><![CDATA[1]]></Text>

You can also consider making the field a normal number field using an auto-enter value of one. For any questions about what the field should use, you can simply add the field to a blank file and use the Save a Copy as XML... option to export and view how FileMaker formats the XML.

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Thank you Matt for the update.

I have tried to use your NamingConvention religiously for years and as a suggestion, I have modified your default table by prefixing the Table Name, i.e., DefaultFields, and each of its subsequent Field Names with a Greek Alpha Symbol, e,g., 'α'

Tables: DefaultFields to 'α_DefaultFields'

Fields: CREATE to 'α_CREATE',
FOUNDCOUNT to α_FOUNDCOUNT, etc

In the past, whenever I wanted to test or modify the parameters of a 'defaultfield', I would copy and prefix the newer 'defaultfield' name with a 'β_'

Thus keeping the DefaultFields, as originally defined pristine, and easier to explain to myself, "what the heck have I just done'?

Daniel M

I do not see the default folders described in the video. I was using Mojave on the Mac and decided to upgrade to Catalina and still the files are not there.

I see shared/filemaker/FileMaker Pro/19.0 and within 19.0 are:
uninstall.sh
Product.v2config
pInfo
LicenseData
keyStore
cert.pem

Can you suggest anything?

On my Mac, the default file is located here:

Applications/FileMaker Pro 19/FileMaker Pro 19/Contents/Resources/en.lproj*/FMDefaultFields.xml

* This is the actual application package. To open it, right-click on it and then choose “Show package contents”