logo

NJP

"Field Help" Tool

Import · Jul 07, 2022 · article

Part of the Developer Toolbox Series. Available as a separate Update Set on Share.

A little more than a tool, but not quite a full application either. Gives you the ability to show HTML help for individual fields in a popup window:

image

The hover over hint for the icon, popup window title and width are customizable as well.

After installing the Update Set, a new "Field Help" Module is added to the "System UI" Application Menu:

image

That will display the list of records you have configured to show. There are 4 examples that are included in the Update Set. They are all for the Field Help form itself:

image

The "Messages" Module added to the "Developer Toolbox" Application Menu displays a list of UI Messages that are used within the tool. I've standardized on using UI Messages now for any message visible to users to make it easier to localize the tools.

It's pretty simple to use. Simply create a new "Field Help" record and fill in the appropriate information:

image

The "Table" and "Field name" specify which field you want to show help for. The "Hint" field is what appears when users hover over the image icon on the form. "Active" toggles whether the record is available to be displayed or not and "Width" specifies how wide the popup window should be. The "Content" field contains the text to display in the popup.

The "Test Current Content" UI Action will grab the current information in the form, whether it has been saved or not, and displays the popup as it would appear on the actual field/form you are configuring the help for:

image

The work to display the information is done by a UI Macro called "u_fpc_field_help". To use it, you must add a new or update an existing "field_decorations" Dictionary Attribute OR Dictionary Override record to add the name of the UI Macro:

image

Or, to make things easy, you can use the "Configure Field" UI Action to configure the field for you:

image

The UI Action only appears for a record that has already been saved. Information/error messages will appear to tell you the status of the operation:

image

Once configured, a image icon now appears beside the field, and when clicked, shows the popup window with the help text:

image

The "Field Help" records will be saved to your Update Sets, including any attachments on the records.

The Update Set is available on the Share site. You can try it out in your personal dev instance first to get comfortable with it before installing it in your dev instance.

Requires the "u_fpc_modal_simple_alert" UI Page from the "Simple Modal Alert" UI Page post. This is used to display an alert in the "Test Current Content" UI Action when the "Content" field is empty.

The Update Set is available here on the Share site.

View original source

https://www.servicenow.com/community/developer-blog/quot-field-help-quot-tool/ba-p/2267102