gnue-sb-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue-sb-discuss] Autopopulating index for lu_item_mfg_model_maint.gfd


From: Mike Vincent
Subject: [gnue-sb-discuss] Autopopulating index for lu_item_mfg_model_maint.gfd
Date: Fri, 13 Jun 2003 23:48:31 -0500

Ok, autopopulating the reference field in lu_item_mfg_model_maint.gfd.. =)

Brief background...
Each manufacturer has a line of products with their own model numbers.
The idea is to normalize all these different model numbers by indexing 
them per mfg. Eg:
  mfg.   model  ref#
  ------ ------ -----
  Nike   123456  1
  Nike   132457  2
  Nike   123756  3
  Hanes  T4200RG 1
  Hanes  H2322F  2

So, we add an int8 field, call it model_count, to the item_mfg table
so we can keep up with what the last ref# we assigned to each mfg's 
model#'s was... or maybe it should keep up with what the next ref#
should be, either way be a means of tracking it. 

When using the lu_item_mfg_model_maint form where mfg's model information 
is keyed in, the process flows something like:
  the mfg is selected/typed
    Fire a trigger to get the model_count for this mfg **
    Put it in the Ref# (inpSegment) entry field
  the mfg's model# is typed
    Fire a trigger to check if there already an entry for this mfg/model 
    pair in the db. and if there is then either pull up the existing data
    and populate the fields, or throw a message that this mfg/model 
    already exists so we dont waste our time with the rest of the info. 
       
  **This assumes we're updating the value of model_count between records

I'm not sure when/where to update model_count, however.
Or even if this is the right approach to this problem..?

  
-Mike
  
  
   
       
       
       




reply via email to

[Prev in Thread] Current Thread [Next in Thread]