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 u_item_mfg_model_maint.gfd (


From: Kenneth D. Reiszner
Subject: [gnue-sb-discuss] Autopopulating index for u_item_mfg_model_maint.gfd (Mike Vincent)
Date: Mon, 16 Jun 2003 13:22:55 -0500

--------------------------------------------------------
Today's Topics:

   1. Autopopulating index for
        lu_item_mfg_model_maint.gfd (Mike Vincent)

  ------------------------------------------------------------------------

Subject: [gnue-sb-discuss] Autopopulating index for
     lu_item_mfg_model_maint.gfd
Date: Fri, 13 Jun 2003 23:48:31 -0500
From: Mike Vincent <address@hidden>
Reply-To: address@hidden, GNUe Small Business Discussion
     <address@hidden>
To: GNUe-SB <address@hidden>

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.
 

I would throw a message. If it becomes a problem in actual practice,  then modify it. I like the idea of model nos being automatically created like

  mfg.   model  ref#    my cat no.
  ------ ------ ----- ------------
  Nike   123456  1    NI-1
  Nike   132457  2    NI-2
  Nike   123756  3    NI-3
  Hanes  T4200RG 1    HA-1
  Hanes  H2322F  2    HA-2
of course you could also add size, discription, color info and I am not sure how you would automate that unless you have a very particular industry in mind. One problem that does sometime come along is that a manufacturer, after discontinueing a product, reuses the model no. for something else or something similar. Not nice.

 
  **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
 


This all presumes that I actually understand what this form is about and that may not be the case.

Ken


reply via email to

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