your database front-end

Server Outage Notice: will be transfering to a new Server on Friday 25th @ 7pm MST

Action Buttons

Action buttons allow for all kinds of interesting functionality such as:

  • Open URL: Jumping to a new application or system based on the current row,
  • PDF Form: Filling a custom prepared PDF Form,
  • Run Procedure: Calling a database procedure and returning data, or
  • Set Value: Setting a field that triggers server-side processing (via a database trigger).

In addition, this topic contains information on:

You can view the video Buttons in Action to see this in operation.

Create/Rename Buttons

Creating an Action button involves opening the appropriate table's preferences and creating the new button on the Action Buttons tab.  This tab can also be used to rename or reorder existing buttons.

dbFront table preferences

Main Button Preferences

Once the table properties are saved then you will see the new button underneath the main buttons in the details area.   Beside the button will be a gear icon allowing you to complete or update the settings of the action button.

dbFront button preferences

In the main tab of the Button Preferences you can update the following settings:

  • Caption: The name the users will see when they look at the button,
  • Action Type: The type of action the button will perform:
    • SetValue: Set a specified field value,
    • RunProcedure: Run a database procedure,
    • OpenURL: Open a URL in the current window, another tab or a dialog.
  • Refresh Level: How much of the screen will be refreshed when the button action completes,
  • Success Message: The message returned once the button action completes,
  • Add to Report Menu: FUTURE: A way of grouping buttons that trigger a report.

Prompt Fields

It is possible to have dbFront display a message or prompt for additional information prior to performing the selected action.  This applies to all action types.  To have dbFront prompt the user open the "Prompt Dialog" tab from the Button Preferences and either select one or more fields or simply add a message.

Dialog (HTML)

The Dialog (HTML) field allows you to specify a message or format the layout of the dialog.  By default, the selected input fields appear after the selected text but if desired you can imbed the prompt fields within the specified Dialog Html using the keyword {%FormFields%}.

Prompt Fields

For each of the table or view fields you can specify if they are:

  • Read-only: For information only,
  • Updateable: Saved to the database prior to performing the button action,
    Note: Will rollback in the event of a procedure or other update error.
  • Passthrough: Passed directly to the button action without saving,
  • Required: Require user input.

Custom Fields

If needed, you can add custom fields in two ways, 1) via view columns, or 2) by adding otherwise hidden columns to a table.   The hidden column route would be required if you want to add a lookup reference to another table. 

Set Value Action

The Set Value action is used when you want to be able to in a single step update a column to a specific value and save the row.  This is often followed up by a table trigger that looks for that specific value and does special processing on the database.

One special feature of the Set Value action is that you can make the button disappear if the row value is already equal.  (For Admin users, the button will appear disabled to allow access to the button preferences)

    dbFront button preferences - set value

    • Field: The name of the field to set,
    • Value: The value to set the field too.  This could be a constant string or one of the following functions:
      • {date()}: Evaluates to the current date (only valid for date fields),
      • {datetime()}: Evaluates to the current date and time (only valid for date fields).
    • Visibility: Determine the visibility of the button based on the current field value.

    Run Procedure Action

    The Run Procedure action is a more powerful alternative to Set Value.  Depending upon the database capabilities and configuration, you could: perform a specialized calculation, send an email, create a report document or even start a backup.

    Procedures can also return results to dbFront for further processing.

    For more details see: Run Procedures

    Open URL Action

    The Open URL action allows for a completely different set of functionality.   It could be used to jump-to, or open a URL on a completely separate system or it could be used to open a specially crafted page on your local system that provides extra functionality such as a report.

    dbFront button preferences - open url

    • URL: The formatted URL including the parameter place holders.  The place holders are numbered from zero to N -1 and surrounded by curly brackets,
    • Destination: How the URL will be opened:
      • Redirect: The application will exit and the new URL will be opened,
      • New Tab: Open the URL in a new browser tab,
      • Dialog: Open the URL in an iFrame inside a popup dialog.  If you choose Dialog you have the option of specifying the dialog size but that is not normally necessary.
    • Parameters: The fields used to populate the URL.

    The following are examples of interesting public URLs that you can try in a dialog:

    • Search Google for a series of keywords.  There are two values shown {0} and {1} separated by a space to show the passing of two field values:{0} {1}&btnG=Search
    • Generate a Bing Map based on an address:{0} {1}

    PDF Form Action

    You can set up an action button to open a stored PDF Form and fill in specified fields and optionally lock the PDF form.  The PDF form can either be an industry provided PDF form or you can easily design custom PDF forms.

    For more details see: PDF Forms

    Button Help

    dbFront supports the ability to set up Table, Field, Button, and even Record level help.

    Button help is added in the "User Help" tab in the Field Preferences.  Once set up, the Button help appears whenever a user hovers over the button.

    Next Steps

    Once all of the button preferences are set as needed

    Content you want the user to see goes here.