your database front-end

Server Outage Notice: dbFront.com 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:

Crystal Report Run a Crystal Report
Custom Search A custom search to quickly filter the table results
Open URL Jump to a new application or system based on the current row
PDF Form Fill a custom-prepared PDF Form
Run Procedure Call a database procedure to process and optionally export or report on the data
Set Value Set a field that triggers server-side processing (via a database trigger)
Web Request Submit a request to a URL to get and process the results and optionally return a report


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. 

Crystal Report Action

One of the most powerful reporting options is to have dbFront launch a Custom Crystal Report.

For details see: Crystal Reports

Custom Search Action

You can create multiple custom search action buttons to allow your users to quickly change the filtering on the current table view. The custom search buttons will appear directly under the specified table.

For details see: Custom Search Blog Post

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: 
      https://www.google.com/custom?q={0} {1}&btnG=Search
    • Generate a Bing Map based on an address:
      https://www.bing.com/maps/default.aspx?where1={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

    WebRequest Action

    The WebRequest action allows you to create a button that will cause the server to open any accessible URL and retrieve some data which can then be saved or processed locally.  The WebRequest action allows the data to be process via a Stored Procedure, and it allows the Stored Procedure to optionally send its results to a Report or Export.

    • URL: The formatted URL including the parameter place holders.  The place holders are numbered from zero to N -1 and surrounded by curly brackets,
    • Parameters: The fields used to populate the URL,
    • Result Type: [Raw, JSON or XML]
      • Raw: means that the full request result is passed to the procedure or save field.
      • JSON: Allows you to specify a JSON Path filter,
      • XML: Allows you to specify a XML Path filter.
    • Result Output: [Run Procedure. Save Fields]
      • The Run Procedure output type will allow you to specify a stored procedure and its parameters, the procedure will be called even if the webrequest fails.
      • The Save Fields output type allows you to specify the Status and Result fields.

    If you specify that you want to process the results using a stored procedure then dbFront will open a "Procedure" tab where you can specify the procedure, the parameters and the output handing including the option to generate a report.

    For more details on how to configure the Procedure and the Procedure output see: Run Procedures 

    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.
    close