# JCards Tutorial

## Contents

1. Introduction
2. Create the fields
3. Change the table view
4. Add cards
5. Editing data

## 1. Introduction

This tutorial will guide you through the initial steps of using JCards by showing you how to define the database fields for a simple task manager. This tutorial assumes that you are starting with a blank database - if you have any fields already defined select File | New to create a new, blank database.

Note that icons and screenshots may differ slightly from the running application.

The following key is used to distinguish between different items:

Key | Description
--- | ---
Italics | On screen GUI control such as a menu item or button.
Text | User entered text

Note that specific topics are covered in the Help document.

## 2. Create the fields

Step | Description | Screenshot
--- | --- | ---
1 | Select the Database | Fields... menu option to open the Database dialog. |
2 | Before defining the first field change to the Counters tab. Click the Add button to add a new Counter. Give it a name of idcounter, but leave the value and increment values at their default values. Switch back to the Fields tab and click the Add button to create a new field. In the Name field type in ID. New fields always default to a String as it is the most used field type. Change the type to Counter. Select the idcounter value in the Counter field. Leave the other fields at their default values and click the Update button. You'll notice that the field name is added to the list on the left. If you select this field you'll notice that the Mandatory check box is now checked. This is because the first field in a database is always mandatory to ensure that by default something is always displayed in the main table. |
3 | Click the Add button again to define a new field. In the Name field type in Summary. Tick the Mandatory check box and then click the Update button. |
4 | Before defining the next field which will be a category we need to define the available items. Click the Categories tab. Add a new Category with a name of Task Type by clicking the Add button at the bottom left. Add an item to the category by clicking the button on the right-hand side. Type in Personal in the dialog box and click the OK button. Add another category item with a name of Business. Switch back to the Fields tab and add a new field with the name of Type. Change the Field Type to Category. This wasn't previously available because no categories were defined. Against the Category field select the Task Type category. In the Default field enter Personal. Click the Update button to create the field. |
5 | Add a new field with a name of Start Date. Change the Field Type to Date. Set the date format to DD/MM/YYYY (or select a different format if not in the UK). Check the Date as today check box. Click the Update button to create the field. |
6 | Add a new field with a name of End Date. Change the Field Type to Date. Set the date format to DD/MM/YYYY. Click the Update button to create the field. |
7 | The final field is a description of the task. Create a new field with a name of Description with a field type of Memo. Click Update to save the new field. All fields are now defined so click the OK button on the bottom left of the dialog window. |

## 3. Change the table view

Now that you've defined the fields you'll notice that the main table view is only displaying the ID field. To change this click on the button in the top right corner of the table. This displays all the defined fields with a check mark against fields which are displayed in the table. Select the Summary, Start Date and Type fields.

You can now rearrange the columns by right-clicking on the field's column header and selecting move left or right. Try this by moving the Type field in between the ID and Summary columns.

## 4. Add cards

1. Click the New card button on the toolbar to add a new button. The card editing dialog is now shown with the ID field automatically set to 1. Fill in the other values as follows:
   - Summary: Book dentist appointment
   - Category: Set to personal
   - Start date: Leave at the default (today)
   - End date: Leave blank
   - Comments: Remember not to book during holiday period
   Click the OK button to save the new card.
2. Add a new card with the following values:
   - Summary: Write report
   - Category: Set to business
   - Start date: Set to blank
   - End date: Leave blank
   - Comments: Refer to previous emails on the subject
   Note that the ID field is automatically set to 2.

## 5. Editing data

Data can either be edited directly in the table (for most field types) or you can open the card and edit it there instead. To edit the data directly in the table just double-click the relevant cell. To open the card:

- Single click on the cell and click the button on the toolbar.
- Middle click on the row.
- Single click on the row and type Ctrl-E.