In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

Uncommon Knowledge - WC_XREF_WINDOW%

When the user presses Ctrl-F10 and chooses to search on indexed fields a collector window is created on the fly that prompts for all of the indexed fields in the file to permit the user to search across them. As this construction can take time, the resulting window is stored in WC_Xref_Window% for subsequent reuse but only if the user F9s on the constructed collector window - regardless of whether data is filled in!

Note that the variable contains two additional fields put at the beginning, namely the data file name (field 1) and the dictionary file variable (field 2).

If as a developer you would like to customise the window used in Xref_Window, paint a collector window which prompts for the fields required and which has the following characteristics -

   Location                ³ Code ³ Command
   ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
   For each prompt option  ³ V    ³ File,Field,M - (E.G. USERS,NAME.XREF,M)
                           ³      ³
   Pre Initialize Process  ³ L    ³ XREF.BROWSE,IN
                           ³      ³
   Post Application Process³ L    ³ XREF.BROWSE,PO
                           ³      ³
   Concept Help            ³ HTUT ³ AW*XREF.BROWSE
                           ³      ³
   Register 4              ³ MAIN ³

   Title MUST be explicitly entered otherwise the window will not work.

   Dictionary names MUST be edited into the template into the normal prompt
   position after it has been saved. Note this should be the dictionary name
   that Btree.Extract is to use including the .XREF extension if applicable.

Note though that the fields must be indexed for this to work as the XREF.BROWSE logic converts the collected information into a Btree.Extract call.

Thus if a collector had been painted called Get_User, a post initialise process could ensure that this was available to the user as follows


0001       Subroutine Set_Xref_Window
0002         $Insert Include, Window_Common%
0003         WC_Xref_Window% = WC_DataFile%
0004         WC_Xref_Window%<-1> = WC_Src_Dict%
0005         WC_Xref_Window%<-1> = Xlate("TEMPLATES","GET_USER", "", "X")
0006       Return

(Volume 4, Issue 4, Page 15)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel