|
|||||||
Uncommon Knowledge - WC_Joined_Keys%An @FM delimited dynamic array containing a host of information relating to the joins currently held by the window. For the purposes of this discussion Real will refer to a field which belongs in the current record and Joined will refer to a field within the current record which has been extracted from another table. The array has a structure as follows < 1 > @VM delimited list of all filenames used in the join operation. This has a one to one relationship with WC_Joined_Handles%. < 2 > Count of files in < 1 > (and by extrapolation, file variables in WC_Joined_Handles%). < 3 > @VM delimited list of Real prompts which are used as the record keys to access the joined records. < 4 > Count of prompts in < 3 > < 5 > @VM delimited list of field numbers in the current record that are used by Joined fields. Note that unlike earlier releases of the join software, regardless of the fields you nominate as Joined fields, the actual field numbers used will always be above those you have defined. EG If you have defined fields F1 to F10 and you use F6 as a Joined field, even though the join information points to field 6 in the dictionary, the information that is stored in the current record for the Joined field will be stored in field 12 - thus avoiding overwriting your proper information! Note that this is one higher than the highest field in use. (It does however have the disadvantage that records are saved with trailing field marks when the temporary fields are nulled down.) < 6 > @VM delimited array of information about the prompts described in < 8 >. Each value is made up of three subvalues as follows < 0,0,1> Dictionary item used as key by this Joined prompt. Note that this is the item name, not the prompt number of the key. < 0,0,2> The Prompt number corresponding to the dictionary item name in < 0,0,1 > < 0,0,3 > Index pointer to the appropriate filename/ file variable for the Joined prompt. < 7 > @VM delimited pointer into the < 1 > (and by extension FILE_HANDLES) permitting access to the file handle/file for a prompt. (See < 8 >). (Duplicates < 0,0,3 > above) < 8 > @VM delimited array of Joined prompt numbers. Used as an index into < 6 - 7 >, < 11 - 12 > < 9 > Count of Joined prompts. < 10 > @VM delimited array having a one to one relationship to < 3 >. Each value contains a subvalue mark delimited list of pointers to the Joined prompt in the < 8 > array which are dependent upon the Real field in the < 3 > array. Thus if value 1 of < 10 > contained 1 and 2, this would mean that the 1st Real prompt in < 3 > controlled the 1st and 2nd values of the Joined prompts in < 8 >. < 11 > @VM delimited array of True/False flags as to whether "Changed Key Delete" (CKD) is active for this Joined prompt. < 12 > @VM delimited array of True/False flags as to whether "Delete Join Record" (DJR) is active for this Joined prompt. < 13 > True/False flag. True if all required locks were successful. By way of illustration the above, imagine a scenario where a screen has two Real prompts, F1 and F2 (apart from the key) which are prompts 2 and 3 in the current screen. Prompts 4 and 5 are Joined prompts to the MENUS table joined on F1 and F2 respectively. Prompts 6 and 7 are Joined prompts to the POPUPS table joined on F1 and F2 respectively. For Prompt 4, CKD and DJR are No, 5, Yes and Yes, 6 Yes and No and 7 No and Yes. The highest used dictionary value in the table is 46. All locks have been successful. The Joined_Keys variable would contain the following (where + represents a subvalue mark) ÚÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ¿ ³ Field # ³ Value 1 ³ Value 2 ³ Value 3 ³ Value 4 ³ ÃÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´ ³ 1 ³ MENUS ³ POPUPS ³ ³ ³ ³ 2 ³ 2 ³ ³ ³ ³ ³ 3 ³ 2 ³ 3 ³ ³ ³ ³ 4 ³ 2 ³ ³ ³ ³ ³ 5 ³ 48 ³ 49 ³ 50 ³ 51 ³ ³ 6 ³ F1+2+1 ³ F1+2+2 ³ F2+3+1 ³ F2+3+2 ³ ³ 7 ³ 1 ³ 2 ³ ³ 2 ³ ³ 8 ³ 4 ³ 6 ³ ³ 7 ³ ³ 9 ³ 4 ³ ³ ³ ³ ³ 10 ³ 1+2 ³ 3+4 ³ ³ ³ ³ 11 ³ ³ ³ 1 ³ 1 ³ ³ 12 ³ ³ 1 ³ 1 ³ ³ ³ 13 ³ 1 ³ ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ(Volume 3, Issue 5, Pages 12-14) |
|||||||
| |||||||