QTIPS - Autofilling Default Values

Published ByDateVersionKnowledge LevelKeywords
Sprezzatura Ltd01 AUG 19912.03+EXPERTDEFAULT, WINDOW_COMMON%

One of the notable features of the dictionary window is the way in which it is possible when adding dictionary items quickly, just to fill in the name, press return and then press F9. The system automatically fills in all fields with default values and continues on to the next item. Identical functionality can be easily provide using the system function DEFAULT (See Vol 1 Issue 8 Page 10). Place the following code on the Pre Save

    $insert INCLUDE, WINDOW_COMMON%
    declare function default
    for X = 1 to WC_W_CNT%
     if @RECORD<WC_W%(X)<4>> = "" then
      if WC_W%(X)<17> then
        @RECORD<WC_W%(X)<4>> = default(WC_W%(X)<17>)
      end
     end
    next

(Volume 3, Issue 4, Page 9)