Variables: Defining their Nature
The first definition element is what type of variable is it..
- integer - is it a number
- string - is it simply a string of characters
- boolean - is it a True of False response to a query
- there are other types which correspond to Frontier datatypes; if you recognize them, you will not need further explanation, if you don't, you'll need to consult the Frontier documentation. Suffice it to say that you'll get most mileage out of the top three...
Does this variable belonging to a group of variables? This comes in handy when you want to, say, prepare a form to fill out that contains a series of variables and mail it to a given address. These variables can be grouped under a same heading (say, eMailActions)
How does this field relate to manila objects, Does it apply to
- first area of application
- messages
- gems
- shortcuts
- members
- global values
- second area of application, if the first chosen is 'messages'
- home pages
- pictures
- stories
In most cases, your value will be applicable to stories/messages.
But you can see the extensibility of the concept...
Hint: Usually, if you have defined the variable's type, click on the modify button so that subsequent menus & choices be adapted to the nature of the value. This will avoid confusion in subsequent steps.
What to do if you absolutely have to change variable type...
This is a costly operation; hopefully you will be wiser than the author of the lines & have defined your database correctly the first time. But in case you haven't, Here are the steps you have to follow:
- First give a consideration to the nature of your data. If you are moving from an integer to a fixed length regular expression, then an entry of 0 (zero) will choke things up: addedValues is expecting something different from what is already loaded...
- You most probably will need to re-import your data. Ensure you have consulted the Import reference material before proceeding. Prepare your file anew, making sure your data conforms to the regular expression check you are implementing
- Change the type of the variable
- import the data (don't forget that your 'Create stories' variable = false)
- you may have to re-index the variable (not a bad thing to do anyways)