# Add “Housekeeping” Fields

**URL:** <https://the.fmsoup.org/t/add-housekeeping-fields/2131>\
**Category:** Questions\
**Tags:** base-fields, table-columns, default-fields, new-file-creation\
**Created:** [May 15, 2021, 3:15pm UTC](https://the.fmsoup.org/t/add-housekeeping-fields/2131 "2021-05-15T15:15:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![steverichter](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steverichter/32/1022_2.png) [@steverichter](https://the.fmsoup.org/u/steverichter)\
**Post date:** [May 15, 2021, 3:15pm UTC](https://the.fmsoup.org/t/add-housekeeping-fields/2131/1 "2021-05-15T15:15:09Z")

</div>

I’m creating a new database by dragging a text file onto the FMP19 start-up screen. This process quickly creates a new file, table, and associated fields. However, this process does not create the standard “housekeeping” fields (primary key, et al). Is there a way to automate creation of the housekeeping fields?

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [May 17, 2021, 1:28am UTC](https://the.fmsoup.org/t/add-housekeeping-fields/2131/2 "2021-05-17T01:28:18Z")

</div>

This is done with the FMDefaultfields.xml file. You can find out more about them here [Default Fields](https://support.claris.com/s/answerview?anum=000026015&language=en_US) and in the help files [https://help.claris.com/en/pro-help/content/database-tables.html](https://help.claris.com/en/pro-help/content/database-tables.html). When you read that documentation be aware that the file name changed from DefaultFields.xml to FMDefaultFields.xml with v19.2.

---

<div class="post-metadata">

**Author:** ![steverichter](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steverichter/32/1022_2.png) [@steverichter](https://the.fmsoup.org/u/steverichter)\
**Post date:** [May 17, 2021, 1:30am UTC](https://the.fmsoup.org/t/add-housekeeping-fields/2131/3 "2021-05-17T01:30:31Z")

</div>

> [@Malcolm](#):
>
> This is done with the FMDefaultfields.xml file.

Thanks. Unfortunately, I believe the housekeeping fields need to be added manually (copied from another file) in this scenario. There is no way to automate this.

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [May 17, 2021, 1:52am UTC](https://the.fmsoup.org/t/add-housekeeping-fields/2131/4 "2021-05-17T01:52:25Z")

</div>

Yes. Obviously it's easy to copy them in, but there will always be a couple of steps.

---

<div class="post-metadata">

**Author:** ![mipiano](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/mipiano/32/1074_2.png) [@mipiano](https://the.fmsoup.org/u/mipiano)\
**Post date:** [May 17, 2021, 5:05am UTC](https://the.fmsoup.org/t/add-housekeeping-fields/2131/5 "2021-05-17T05:05:01Z")

</div>

I wrote a FileMaker file as a by-product of a job, which can be used to create an FMDefaultFields.xml from the XML copy of a FileMaker file, which is then stored in /Users/Shared/FileMaker/Shared/. You create the fields in "Manage Database" in the table "MyDefaultFields" - with your own settings. My file then creates the FMDefaultFields.xml with your new default fields that FileMaker subsequently creates when a new table is created.

The file is almost ready. I can provide it here in tomorrow or the day after tomorrow.

The file needs a free plugin which my file installs. Afterwards the plugin can be uninstalled again. (2empowerFM Text Toolkit by [dracoventions.com](http://dracoventions.com))  
The file will work on WIN and Mac.  
😁

\_\_  
Edit: I got the idea from this article on [soliantconsulting.com](http://soliantconsulting.com): [How to Customize Default Fields in FileMaker Pro 19](https://www.soliantconsulting.com/blog/filemaker-customizing-default-fields/)  
The described steps can be automated by using regular expressions. Therefor I need the mentioned plugin.

---

<div class="post-metadata">

**Author:** ![pixi](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/pixi/32/1929_2.png) [@pixi](https://the.fmsoup.org/u/pixi)\
**Post date:** [May 18, 2021, 9:15am UTC](https://the.fmsoup.org/t/add-housekeeping-fields/2131/6 "2021-05-18T09:15:47Z")

</div>

There is a lengthy thread and a demo file here:  
[https://community.claris.com/en/s/question/0D50H00006dsk3hSAA/default-fields-xml-generator](https://community.claris.com/en/s/question/0D50H00006dsk3hSAA/default-fields-xml-generator)  
Remember that the "DefaultFields.xml/FMDefaultFields.xml" is language dependent! If you run FM in e.g. English and another copy in e.g. French you have to create/update both FMDefaultFields.xml

---

<div class="post-metadata">

**Author:** ![mipiano](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/mipiano/32/1074_2.png) [@mipiano](https://the.fmsoup.org/u/mipiano)\
**Post date:** [May 18, 2021, 10:53am UTC](https://the.fmsoup.org/t/add-housekeeping-fields/2131/7 "2021-05-18T10:53:45Z")

</div>

I have not found a file for FMP19 in the thread. Did I miss it? The old file no longer works for the new format. At least when I had tried it the last time a few months ago.

With my file it will be possible to keep several tables with standard fields for different projects or customers. Then you can exchange the FMDefaultFields.xml at any time in a flash. These tables with default fields are created in my file as usual under "Manage Database". Via "Save copy as XML" I read out the properties and then assemble the correct XML - based on the FMDefaultFields file belonging to the system language.

I'm a little tight on time right now. But I hope to be done with it until tomorrow. The XML creation is already working and tested. I'm still working on the rest of it.

---

<div class="post-metadata">

**Author:** ![mipiano](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/mipiano/32/1074_2.png) [@mipiano](https://the.fmsoup.org/u/mipiano)\
**Post date:** [May 20, 2021, 9:05pm UTC](https://the.fmsoup.org/t/add-housekeeping-fields/2131/8 "2021-05-20T21:05:39Z")

</div>

Unfortunately I have not found the time yet to finish my announced file. My current project was too time consuming. It will take me a few more days to finish the file. Sorry …
