One of the main additions in the new version of StarView is the
ability to edit existing forms or create new forms from scratch. In this
tutorial we will show you first how to add fields to an existing form and
then how to create a new form from scratch.
First to edit a form, start StarView and load the Quick_Search form from the Searches menu..
To edit this form, click on the “Static” button on the lower task bar. This will then change to “Edit”. Let us now say we don't need the Target Name information.
You can now change the form. To change the size of a field you can left click on the label it and options will be presented to you:
Properties will allow you to change the size and appearance of this item. Sort data will sort the data in memory based on this column. Help will tell you about the database field that will be displayed in this area. Delete Component will remove this item from the form and from the qualifiers. So now I will delete the two Wavelength entries. Fields can also be moved by left clicking on their labels and dragging them where you want them. Config up to the empty row.. Next we want to make the config field larger. We right click and get the fields Properties...
Here we can change the label and widths of the label and the text box. We want to change the Data Width to 20 columns so we do that and press OK. The form now looks like this:
We can also change the appearance of the tables. By right clicking on the the table and selecting properties you can change the tables size on the form. You can also sue the table header to change the width and order of fields. By left clicking on a header, you can drag the column to a new location between other columns. By clicking between columns you can resize the width of the column to the left.
Next we want to add a new field. Doing this requires some knowledge of the database system. Forms cannot mix entries from different databases, as the server that joins the database tables cannot know the relationships between entries in different databases. Thus, before you can add any field to the form, you must first know what database the fields in the current form come from. If you are unfamiliar with the databases, you need to pick a field from the current form. Any qualifier besides Radius will do (Radius is NOT an external database field but rather a local one used to build queries). Right click on its qualifier and get more information by selecting the "Get DB Field Info" menu item.
You are presented with the following informative popup.
Here is listed all sorts of information about this database entry, including which database it came from (in this case, catalog) and which table in that database has the field (in this case, science). It also tells you that it is a numeric entry (float), has a logical type (ra), and is associated with sci_dec (the other half of the coordinate). Finally it shows you the "help text" for this field. This help text is sometimes useful to figure out what the field will contain, though sometimes it is rather complex as to how different data header keywords map into the database from different instruments.
So we now know that this form was created from the catalog database. Hence we can add anything from the science database to this form. In our case let us assume were interested in knowing the target category for this observation. To find this we use the Custom query generation tool. It can be found in the View menu. When it appears it looks like this:
Shown in the treed folder listing is the DADS system (catalog, cdbs, iue. other_sci_data, and proposaldb).
Shown on the top of this tool are the four different ways to display information on a form: in a text field (all of the ones on the form we have worked on have been in fields), in a table, in a list (equivalent to a single column table), and in a multi-line text area. For simplicity sake we will add a Field to this form, so we select Field. The next two areas are the search area, used to find items in the databases based on substrings of their field name, keywords, or definition. Let us say we know that we want to add a field that has broad_category in its field name. So we can find it by searching on the field name "broad_category".
We got two different results. We can examine the database entry by right clicking on the result and selecting View Database Field. This will show all of the information we have about that field. These two fields produced these informative popups:
They appear to be the same entry in two different tables. The Science one seems to have a default label so we will add it. To add an unselected item from the search table, simply right click on it. At any time you can right click on an item and add it from its popup menu item labeled Add Item. Doing this we now have our form looking like this
Note the new field is added to the bottom of the form.
Now we can put the form back into Static mode (so we don't mess it up) and save it. Before saving any form, it is a good idea to do a simple search to make sure the form is valid. Simply click on search and make sure something comes back besides an error message.
To then save the form, click on the Save button and follow the dialogs. Be sure to save the form somewhere in your svdata directory (the file save dialog will start up in that directory). Saving outside of this directory tree will result in the form not appearing in the Searches menu and thus the form will not be loadable without using the Open Local Form menu item under file and browsing to the file. Think of this SVData directory as containing bookmarked local forms and save things there.
To share a form with someone else, you need only tell them where the form is stored. They can either load it with the Open Local Form menu, if they can get to that form from their local machine, they can copy the form to their own workspace, or make a symbolic link to the file in their SVDATA directory (a good method of bookmarking other local forms). If the user is remote, the file will need to be transferred to the other site. Note this is a binary file and must be transferred accordingly, either with a binary transfer in ftp, rcp, or scp, or as an encoded mail attachment. Simply saying
mail joe@bigscience.net < briliantform.crvwill result in the file being corrupted by the mailer (as it assumes it is text) and confusion on the part of joe.
Finally, if you create a form that you and other people cannot live
without, please tell us here at archive@stsci.edu
and we will look into adding it to our set of served forms.