Managing Forms in Vivaldi

Typical form design process

Previous General Vivaldi Settings

Creating forms

There are two types of forms available with Vivalid:
Table - A tabular form that shows rows of records.  You can (optionally) specify a related Detail form that is used to add, edit, and view more details.  You can also (optionally) decide whether users can delete records from the table view, and export to PDF or Excel.

Detail - A single record detail view that is displayed in a responsive popup dialog.  The detail view can have more information than you would show in a table.  You can open Detail forms directly from a menu, but usually you will have a corresponding Table form where users search and locate the record they want to view/edit before opening the Detail form.

  1. To create a new form, navigate to Forms > Manage Forms in the menu.
  2. Select the "New" button.
  3. Enter the form name and select a type (Table or Detail).
  4. Select the name of the table that contains the data for the form in the "Base Table" field.  It will automatically create the basic Form SQL.  You don't need to adjust the Form SQL unless you want to apply special SQL to the form.  Note that the Base Table is used for any insert/edit/delete operations.  The Form SQL is only for fetching information to display in the form.  So if you add fields to a Detail form that aren't present in the Base Table, it will cause issues when trying to insert/edit records.
  5. Once you have completed the initial form efinition, save and close.
  6. Now you can desin your form by selecting the Design button in the form table list.

Designing your form

The Form Designer contains three left-hand panels.  The Properties, Items, and Permisssions panels:
Form Designer Panels
The Properties panel contains the same options as the "Creating Forms" step, and is available as a convenience.

At any time you can preview your form or expand it to full screen by selecting the options on the right-hand side of the screen:
Form Designer Buttons


Adding items to your form

Vivaldi helps you add text boxes, dropdowns, buttons, and other elements to your Table and Detail forms.  When you have a paired Table and Detail form, you will want to make sure each form has a field defined that has the "Primary Key" set to yes (you can hide it if you want) that will represent a unique record.

  1. Select "New" in the Form Items panel.
  2. Select the corresponding form you are working with in the dropdown.
  3. Enter a caption for the field, and what column in your table/view the field should be bound to in the "Bound Field" field.
  4. If your form is a Table form, then use the "Table Display Order" to dictate the order of columns.  If your form is a Detail form, use the "Detail Row" and "Detail Column" to determine the order of display.  For example, row 1 might have 2 fields, row 2 might only have one, and row 3 might have 4.
  5. For Detail Forms, you can group controls in collapse panels by enter a text name in the Collapse Panel property (be sure all of the controls you want to group have the same panel name).
  6. Use the panels below to learn more about each Display Type and how to manage special options for them.
Text boxes, numbers, checkboxes, dates, email, password, and range Display Types just need you to specify the Bound Field. They will write to your database "as-is" based on the user's entry. Click the 'Wizard' button next to the Display Format if you wan to format for dates and numbers.
There are several types of dropdown lists you can create, described below. If you want your dropdown list to be easily searched by keyword, add the class 'chosen-select' to the "CSS Classes" property.
  • Yes/No - Users are presented with a Yes/No option, which maps back to numeric values 1 and 0 respectively.
  • True/False - Users are presented with a True/False option, which maps back to numeric values 1 and 0 respectively.
  • Table/Key/Text Lookup - Click the 'Wizard' button to help guide the selection of the lookup values. Or manually, you can specify a table, the key column, and text value column to use for the list values in the Lookup Source field in the item definition. For example, if you enter tblCustomers;CustomerID;Customer Name in the Lookup Source field, Vivaldi will look for unique values in tblCustomers and display the Customer Name, while the user's selection will be written to your database using the CustomerID value.
    List Source Example
  • Key/Text - You can specify a list of key and text values in the Lookup Source field in the item definition. For example, if you enter 1;Florida;2;Georgia;3;Nova Scotia in the Lookup Source field, Vivaldi will display the options Florida, Georgia, Nova Scotia. When the record is edited/inserted, it will write 1, 2, or 3 to your table depending on which the user has chosen.
  • Function - You can enter one of several pre-built functions into the List Source field:
    • fGetCountryList - Displays a list of countries, and stores the 2-character country abbreviation code.
    • fGetStateList - Displays a list of US states, and stores the 2-character state abbreviation.
Calculated fields

You can add calculated fields to Table forms in the "Table-Specific Settings" panel.  The syntax you must use is: row.Fieldname and then any arithmetic you want to apply.  The fieldname should be the table field rather than the caption you use.  For example:  row.ItemPrice * row.Quantity will result in a multiplication of the fields ItemPrice and Quantity.  You can use common javascript notation for things like toFixed() to cast the results to the desired type and precision.

Default values

You can specify a deault value for any field, or enter the following default keywords which are automatically popullated at runtime:

  • Current User - The username of the logged in user
  • Current Date - The current date in yyyy-mm-dd format
  • Current Datetime - The current date and time in yyyy-mm-dd hh:mm am/pm format

Granting Permissions

In the Permissions panel, you can decide which Roles have access to your form, and whether they can insert/edit/delete records.

  1. Select 'New' in the Permissions panel.
  2. Choose a role in the Permissions popup dialog.
  3. Choose the form you want to grant permissions to.
  4. Select whether the user has View, Insert, Edit, and/or Delete permissions.  Note that View is not inherited when a user can insert/edit/delete.  You will need to grant View for the user to see the form in the first place.

Note:  If the form is not configured to allow an action, users cannot perform that action even if they have been granted permission for it.  For example, if you set "Delete Records" to "No" for the form, and a role has "Delete" set to "Yes," users won't be able to delete record unless you set the form to allow deletes.

Copying Forms

You can copy a form from within the Form Designer by selecting the "Copy form" option at the top-left of the screen below the form name.  When you copy a form, you specify the copy name as well as whether you want to include the related role permissions for the original form.

NextManage Menus in Vivaldi