Tip:
Highlight text to annotate it
X
The next thing we want to do is just take a quick peek at the Value range tab.
Now this tab is all about setting a valid value ranges for the domain that you are creating.
If you set a value range and the user enters a value in a field outside the valid value
range that you set up, they will be shown an error message and be requested to enter
a valid entry. Now, there are three options for the value
range. The first we can see says Single values and
this is where you actually enter a list of individual valid values that a user can enter.
The next is Intervals. So if you have quite a lot of values but they
are all related or all in a sequence you can enter the lower limit and the upper limit.
For example, a lower limit of 1, an upper limit of 9, and that saves you entering 9
individual single values. A user can only enter a value that falls within
the ranges that you specify. The last option you have is Value table.
When you have a large number of possible entries it is quite common to use a value table instead
of a value range or list of single values. With a value table, you specify a complete
valid value table entry list. But please note that if you use this option
you must also introduce foreign keys to your table to ensure the user's entries are tested
against the values stored in the value table that you create.
We don't need to enter any value ranges for this domain.
So what we need to do is click the Save button. Once again we are presented with the Object
Directory Entry pop-up box and we want to assign this object as a local object, so click
the Local object button. Now, the next thing we want to do is activate
this object. Even though we have saved it, it doesn't mean
we can actively use it within our table yet. We need to set the object as active.
Which means our other data element can actually use this domain going forward.
So on the tool bar you'll see a little match stick icon, you hover over it says Activate
and you can also press the Ctrl+F3 key. Click the Activate button and here you are
presented with a pop-up box which lists three different objects that are currently inactive.
You can if you wish try and activate all the objects together by I strongly advice you
DO NOT do this. hen you are working in a typical development
environment you will get a number of other people creating developments all the time
and it is quite often you will see their objects appearing in this list.
Or maybe you've got a number of development projects on the go for yourself and you could
see inactive objects that you have created yourself in another project that you don't
want to activate just yet. So, for now, we only want to activate the
domain. So, our top entry, Object type DOMA, we can
see the ZEENUM. It is highlighted at the moment.
So, what we need to do is click the green tick.
The system goes away, checks all the entries we have made for the domain itself, and if
everything is okay, you will then activate the object.
And if you look at the status bar at the bottom of the screen, everything is okay so we can
now proceed on with creating our table. Now, remember, we use forward navigation for
generating our domain. So, what we need to do is step back.
So, click the F3 key and you will be taken back to your data element maintenance screen.
Now, because we have created and activated our domain, we can now see the text for our
domain has actually come through and being placed beside the ZEENUM entry that we entered
before. And, it has brought back the individual domain
properties that we created. Now, the next thing we need to do is define
the Field labels. So, click on the Field labels tab and here
we need to define the Short, Medium, Long, Heading field labels for our data element.
Now, we will short cut here. We've already entered the Short text, so if
you highlight that and use your Ctrl+C key to copy the entry to the clipboard then you
can come down to each individual field label and just paste it in one at a time.
Now, we can see for the short field name, our Employee Data element does not fit into
the Field label so then just go ahead, tailor it until it all makes sense.
Now, remember, the field labels that we enter here are going to appear as field labels on
our table. So we don't actually want it to say Data element,
we just want it to say Employee or Employee Number.
So in this case, I'm just going to choose Employee N, Employee Number, and copy that
to the remaining field labels. Now, you see on the left hand side there's
a Length field which I have on purpose not filled in because once you put the entries
in the Field label and press the Enter key, it will all automatically calculate the length
of the entries that you have typed in. Once this is complete, save the data element
and then activate it. Again we got a window showing the inactive
objects, this time but only left with two objects.
And remember, we only want to activate the object we are working on right now.
So highlight it, we can see Object type DTEL, which is the data element.
So just click the tick button. And if everything works out okay, the status
bar at the bottom of your screen will show Object(s) activated.
ow again we use forward navigation from our table to create our domain.
So what we need to do is press the F3 key or press the Back button and we step back
to our table maintenance screen. And you can see right now the Employee field
that we were creating and the data element entry that we keyed in has got the appropriate
data type, Length, Decimals and Short text brought back into our grid to indicate everything
is working okay. Now we have just gone through the sequence
of creating a data element and domain that we then used for our field.
We are going to use the exact same practice for creating four additional fields.