the web front-end for your database

Action Buttons

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

  • Setting a Hidden or Read-Only field,
  • Running a database procedure,
  • Jumping to a new URL based on the current row, or
  • Opening a new URL in a popup window or dialog overlay (iFrame) based on the current row.

The applications of this could include:

  • Jumping to a new application or system based on the current row,
  • Opening a web based reporting tool based on the current row,
  • Setting a field that triggers server side processing (via a database trigger), or
  • Calling a database procedure to send an email.

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

Create/Rename Buttons

Creating a 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.

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 which 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 as compared to the value that the button will set.

    Run Procedure Action

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

    dbFront button preferences - run procedure

    • Procedure: The name of the database procedure,
    • Parameters: The list of fields to pass to the database procedure.

    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: 
      http://www.google.com/custom?q={0} {1}&btnG=Search
    • Generate a Bing Map based on an address:
      http://www.bing.com/maps/default.aspx?where1={0} {1}
    Content you want the user to see goes here.
    close