Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Back to Blank a DropList Selection

Browsers & ListBoxes

Back to Blank a DropList Selection

by  Gaudalier  Posted    (Edited  )

PRELIMINAR:

As Ya already know, the FileDrop is filled from a Queue, wich is based on an View.

So if ya don't have the "Default first entry if USE variable empty" checked, the first time the window is open, the list is BLANK selected, ok???

but when the user clicks and select any item on the list, there are no posibilities to back to BLANK selected, this is 'cos when open, the file record is clear, and it's pointer to record number 0 (Then The record Buffer is Empty).

SOLUTION:

Well, if ya wanna to get back and blank the fist Entry: You must do something like this:
Code:
GET(YOURDropListTable,0)
CLEAR(YourVariableTargetField)
FLUSH(FDBX::View:FileDrop)
FREE(Queue:FileDrop)
CLEAR(YourDropListVariable)
?YourDropListVariable{PROP:SELECTED} = 0
ThisWindow.Reset(TRUE)

Something more lucid:

Code:
MainTABLE:           ProdTable,PRE(PRO)
MustBeInListTABLE:   TypeTable,PRE(TYP)

DropList: 
  Use(TYP:TypeName)
  FROM(Queue:FileDrop)
  TARGET(PRO:Type)
  View(FDB1::View:FileDrop)

Clearing the Selection:

GET(TypeTable,0)
CLEAR(PRO:Type)
FLUSH(FDB1::View:FileDrop)
FREE(Queue:FileDrop)
CLEAR(TYP:TypeName)
?TYP:TypeName{PROP:SELECTED} = 0
ThisWindow.Reset(TRUE)

That simple!...

Bye.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top