your database front-end

Context Specific Help

Adding context-specific help to a record is quite straight forward in dbFront.

Step 1. Getting the Help Text

The first step would be to store the "Status" specific help somewhere in your database and create a view to retrieve it.

Below is a sample SalesOrderStatus table with a HelpText column.  The idea is that different help text is displayed depending upon the status of a given SalesOrder.   You can get as creative as you need, you can even include date-specific help if needed.   The only requirement is that you are able to make a view that can retrieve the HelpText for that SalesOrder.

CREATE TABLE SalesOrderStatus (
    StatusId int NOT NULL,
    Caption varchar(50) NULL,
    HelpText varchar(1024) NULL,
 CONSTRAINT PK_SalesLT.Status PRIMARY KEY (StatusId))

The following relationship is not required to retrieve the HelpText but is handy if you want a dropdown in dbFront.

ALTER TABLE SalesOrderHeader
    ADD CONSTRAINT FK_SalesOrderHeader_SalesOrderStatus
    FOREIGN KEY (StatusId) REFERENCES SalesOrderStatus (StatusId)

Here is a sample view that returns the HelpText for the current StatusId.  This view will be joined to the table in dbFront so you may want to look at the following help topic for more details: Table Views.

CREATE VIEW vSalesOrderStatusHelp AS 
    SELECT s.StatusId, s.HelpText vStatusHelpText
    FROM SalesOrderStatus s

 

Step 2. Displaying and Formatting the Help.

Once you can retrieve the HelpText, you would make the following changes in dbFront to display and layout the help.

  1. Open the table properties in dbFront.
  2. Switch to the "Views" tab and select the "vSalesOrderStatusHelp" view you just created,
  3. Save the table properties and open them again,
  4. Open the "Form Fields" tab and add the view field "vStatusHelpText" to the top of your selected field list,
  5. Save the table properties again.

This should now show the HelpText for that record's StatusId in a read-only field at the top of the display.

Now we format the Help Text further.

  1. Open the Help Text field properties.
  2. Change the Caption to the help text you would want to see if a "New" record was on screen.   e.g. "Save this record to continue processing."
  3. Switch to the "Layout" tab.
  4. Change the Label Position to "Inline"
  5. Optionally set a Css Class name for the Help Text
  6. Save your changes.

The "inline" Label Position will cause the HelpText to display full width with the caption hidden.  If no record or an empty HelpText is selected then the user will see the Caption you specified for the Help Text.

You can add a custom CSS file to further format the help text based on the CSS Class you assigned in the last step.

Content you want the user to see goes here.
close