A variable is the name of field within one of the entities that addedValues knows about - Manila messages, Gems, member records or addedValues shortcuts, globals, user transactions or other specialised addedValues objects. Manila supports many variables already, such as the body (text) and subject of a message, the postTime of a message and so on. In the metadata Plugin, variables were called metatypes.
You can add new variables to each message (gem, member, shortcut) by defining them on the addedValues variables home page and then refining the definition by selecting it from the multiple choice box and clicking the edit button. Click on the images below for a full size illustration
![]() |
![]() |
| Variables Home | Variables Detail |
|---|
When a variable is first defined, addedValues sets its attributes to default values, some of which can be changed as a site preference. For many purposes, the defaults will do; when it won't consult the menu items under Variables (see left menu) for the meaning of the attributes.
Another preference determines default values of some of the properties of new variables. You can also clone an existing variable, by seelcting the original and entering a name for the copy.
On the Variables Detail page, most rows have a link to specific help pages for the corresponding variable attribute.
When you create or change a variable, addedValues might have to examine every entity of that type (message, member) to be sure there is no conflict, to change the representation of an existing value, or to gather the values into an index. If the number of candidates is large, this process can take some time. Because values are sometimes manipulated, there is a possibility of errors occurring, these are reported with a link to help correct the offending message (member, GEM, etc.) However, if 10 errors are seen the process terminates and it is prefixed with a question mark in the variables list. When the variable is edited the variable detail pages will show which routines failed, and offer a button to Retry the failing action. Error messages from a retry attempt are the same as displayed by the original and they will link to the message where the error occurred. Fixing the errors clears the question mark flag and removes the Retry button.
Modifying a variable might invalidate the choice of renderings made for each form that includes the variable. addedValues allows such changes but it notes such potential problems and provides a link to each affected forms detail page.
Variables are protected against deletion if any use is made of them in the website. AddedValues lists all the current places each variable is used, and links to a URL where you might modify that usage.
Methods are the scripts generated for each variable to handle getting and saving values, validation etc. For indexed variables there are additional scripts which support search. These scripts are built from templates at variable define time and thereafter when modifications require. If the method script templates are changed, either to fix bugs or provide enhancements, these generated scripts become obsolete.
As a rule of thumb it is best to have the latest versions of method scripts, but their action is so fundamental that automatic regeneration was deemed. This has led to additional support work because bugs fixed in methods are not propagated until the site variables are modified. to overcome this, addedValues checks for obsolescent methods at enable time and remembers that status for each variable until the next enable or until editing the variable regenerates the methods. This status is visible because variables with one or more obsolete methods will appear with a line-through in the variables menu in modern browsers, and with a prompt to regenerate on the edit page. If you see obsolescent varibales, but your site is working satisfactorily there is no immediate need to regenerate; but you should plan to do it at a convenient early date.
A Manila server administrator who has installed controlpanelAddins from bayly.root can use a new applyTo process called addedValuesMethodsObsolete to do this from the administration website (you will need to update bayly.root to obtain this enhancement).Bugz reports for addedValues, from websites that have obsolescent variables will not be looked on favourably.
addedValues creates some standard globals in every website - USstates which is a lookup table, and USZipCode and USPhoneNumber whose values are regular expressions, which can be used to require variable values to match that regular expression. It also creates a special variable - addedValues.logo - which contains an image link to the addedValue website and which is appended to every form created with addedValues on servers with non registered copies of the plugin.