user3045390
user3045390

Reputation: 1

How do I create a refresh button in Openedge?

On a screen I need to create a refresh button, the button I created, but I want to know how I can incorporate the refresh functionality.

Upvotes: 0

Views: 2903

Answers (1)

ujjb
ujjb

Reputation: 53

1) Using the Appbuilder palette select the button widget.

2) Place it on your openedge frame. It doesn't have to be a smart frame.

3) Go to the trigger section of that button. The editor should open up with the "On Choose" trigger automatically selected.

4) Add code in the choose trigger to call the refresh method of the browse.

Here's a code snippet to get you going:

On "Choose" of "Button-1" in frame fMain DO:

  browse BROWSE-1:refresh().

 {&OPEN-QUERY-{&BROWSE-NAME}}

END.

Notes:

1) the On Choose part should be written for you by the appbuilder.

2) Replace BROWSE-1 with the widget name of your browse widget.

3) The refresh method on the browse may not reread data from the database. You'll need to reopen the query to fetch the latest records.

Hope this helps.

Upvotes: 3

Related Questions