-
Notifications
You must be signed in to change notification settings - Fork 0
003_DEFAULT blocks
The [Default] block is supported by MyData II, but has been deprecated. One should use [Template:Default] in stead. Full information on Templates will be added later.
Default blocks, can just be started as [DEFAULT] and it doesn't matter how many of these you put in, nor where you place them (as long as [RECORDS] is last). They do as the name implies. Set up the default values for fields. The only requirement is that the field has been declared before. Now if you place one big [DEFAULT] block after you declared all fields on all pages, or place one below every page is up to you. Not only was this kind of freedom easier to code, I think it's also a kind of advantange in the end result. :)
[PAGE:My Page]
string Country
[DEFAULT]
Country=The Netherlands
This will cause that each time a new record is created "The Netherlands" will be put into the field "Country" by default. If you keep it "The Netherlands" or put anything else into it is up to you. Of course, it goes without saying, but these blocks have no influence whatsoever on records created with the "Duplicate" feature, which I will get into later.
In large projects (such as RPG games in my case), you may benefit from setting these values correctly, as when you have many items with standard values with only a few changes a lot of work can be taken from your hands by MyData, simply by setting these right!