Kbase 17398: Non fill-in objects won't clear when no record source
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Non fill-in objects won't clear when no record source
Any non fill-in objects on a SmartViewer, such as a toggle-box,
combo-box, and radio-set will not be cleared when the record
source for the SmartViewer does not have a record available.
Consider the following example, a SmartBrowser for Customers
linked to a SmartBrowser for each order of customer and a
SmartViewer for order information which includes a toggle box for
an Order logical field (to test this with sports database a
logical field would need to be added to the Order table). If
a customer is selected in the SmartBrowser that has orders then
the toggle-box will contain the appropriate data. If a customer
that has no orders is selected, the fill-in fields in the Order
SmartViewer are cleared but the toggle is not, if the last Order
that was displayed had a true value then the toggle will remain
checked even though an Order is not being displayed.
This is expected behavior, in adm-display-fields in
src\method\record.i, when an order isn't available then the
following code is run:
CLEAR FRAME F-Main ALL NO-PAUSE.
CLEAR FRAME only clears fill-in's, it does not clear other
objects such as toggles, combos or radio-sets.
For the case where you are using a toggle-box you can clear
it with the following code in a local-display-fields in the
Order SmartViewer:
/* Code placed here will execute AFTER standard behavior */
IF NOT AVAILABLE Order THEN DO:
sports.Order.test:SCREEN-VALUE IN FRAME {&FRAME-NAME} = "no".
END.
When a customer with no orders is selected, then the toggle
in the Order viewer appears to be cleared along with the
fill-in fields.
Progress Software Technical Support Note # 17398