4D v16

Data Manipulation with 4D Server

Home

 
4D v16
Data Manipulation with 4D Server

Data Manipulation with 4D Server  


 

 

In the section Defining the Database Structure, you have created the [Employees] table and let 4D create the default forms for that table. You are now ready to enter records.

In Design mode, 4D provides you by default with tools and editors for entering, querying, printing or modifying records. Subsequently, you can set up your own tools for the Application mode.

1. Choose New Record from the Records menu.

The blank input form appears.

2. Enter your first record as shown.

Use the Tab key or the mouse to navigate between the fields.

3. Click on the form validation button (the one at the bottom) to validate your data entry.

A blank input form appears so you can continue adding new records.

4. Enter five more records with the values listed here.

Last NameFirst NameSalaryDepartment
HowardMike39500Engineering
SmithJohn32500Production
DoeJane43000Engineering
HarrisonBill34250Production
JonesLouise35000Production


After you have entered the last record, click the cancel icon (the one with a cross, above the validation icon) so that you cancel the new blank input form. You go back to the output form.

5. If all the six records are not shown, choose Show All from the Records menu and resize the window or columns if necessary.

You should have:

The records are now stored in the database on the server machine. If a second remote 4D were connected to the server machine, it could display the records you have just added. Conversely, if other clients were also entering records, you could choose Show All from the Records menu to display all the records, including the ones they had entered. Records stored on the server are accessible to all users.

Once you have entered records in the [Employees] table, you can search, sort, print, and otherwise manipulate the records. For example, let’s look for the employees of the Engineering department.

1. Click on the Query button in the toolbar.

The Query Editor appears:

2. Leave "[Employees]Department" as search criterion and “is” in the Comparisons list, then enter "Engineering".

3. Click Query.

The query is sent to 4D Server, then 4D Server replies to 4D. In the output form, you now have only the employees who work in the Engineering department:

4. To show all the records again, choose Show All from the Records menu.

In just a few minutes, you have created a server database, defined a table, added records, and then made a query using the data entered in the database.

It is now time to add a custom menu bar to your database. Go to the Adding a Custom Menu Bar section.

 
PROPERTIES 

Product: 4D
Theme: 4D Server in 10 minutes

 
HISTORY 

 
ARTICLE USAGE

4D Server Reference ( 4D v16)