Retrieving a Field's Help Text

KMoody

Member
Progress: 10.2b SP7
OpenEdge Architect: 3.4.2.R342_v20090122-9I96EiWElHi8lheoJKJIvhM3JfVsYbRrgVIWL
OpenEdge OS: Windows 7 Professional 2009 SP1

When you set up a database field, you can assign it default help text:
upload_2014-6-17_11-41-47.png

As the user tabs through entry fields, this help text appears automatically at the bottom of most frames. However, if the frame is a dialog box, you cannot see this help text.

I'm using a dialog box frame. When the user focuses on a fill-in or editor box, I want to display the widget's field's default help text in a text box widget. However, I'm not sure how to access that information.

I've tried using buffer-field like this:

Code:
DEFINE VARIABLE hPopupBuffer  AS HANDLE  NO-UNDO.
CREATE BUFFER hPopupBuffer FOR TABLE "CUSTOMER".
hPopupBuffer:BUFFER-FIELD("CUSTOMER-NAME"):HELP.

However, the value returned is always unknown.
 
I have used something like this in the past for dialog boxes which seems to work okay:
Code:
DEFINE VARIABLE hField AS HANDLE NO-UNDO.

ON ENTRY OF FRAME fdialog ANYWHERE DO:
   hField = LAST-EVENT:WIDGET-ENTER.
   IF hField = ? THEN hField = FOCUS.
   IF hField <> ? AND hField:HELP <> ? THEN
      MESSAGE hField:HELP VIEW-AS ALERT-BOX.
END.
 
It should give you the original database field's help text for database fields. I have tested against the Sports2000 database for the Customer.Name field and it gave "Please enter a name." which is the help text stored in the database.

With you also finding that hPopupBuffer:BUFFER-FIELD("CUSTOMER-NAME"):HELP. is not working either, it appears that for some odd reason the help value is not being picked up. Is it the same for all tables?
 
I took another look at this, and my solution does work with other tables. Turns out I was originally testing with tables that didn't have help text. :rolleyes:

Thanks, Osborne!
 
Back
Top