Linking one UDF to another

I don't think this is possible in Sage 100c but I thought I'd ask.

We want to store attributes on each item. For example, various attributes could be product type, material, color, etc. For each attribute we'd want to pick its value.

Example:

Attribute = Product Type

  • Available choices = apple, pear, banana, cucumber, lettuce, carrot

Attribute = Color

  • Available choices = red, yellow, green, orange

So in the item, we'd choose "product type" as the attribute we want to capture for this item and the next drop-down or look up list would only show us values related to the value chosen. So if someone picked "product type" as the attribute, the next drop down would show only the options for the product type, not the color attribute choices. However we could have dozens of attributes we want to capture, so it seems like a "one to many" type relationship is needed.

Is this possible in Sage?

Parents
  • 0

    I did this once with UDF fields and scripts.  I had a separate UDF for each Product type's linked field values.  Using your example, I had UDF_Apple_Color, UDF_Pear_Color, etc, and each one had it's own list of color values.  With scripts, I used oScript.SetUIControl to show the correct UDF when the Product type changed, i.e. when Product Type = "Pear", show UDF_Pear_color and hide the rest.  The script also copied the value from the Color List into a Color Text UDF, which is the field that can be used in reports (so the color value is in the same field for reports.)

    This was a good option for the company because their Product Types were static and they only had about six  The values of the color lists could change, so we used UDTs for those.  If your Product Types change a lot, or you have too many of them to create UDFs for each one, this wouldn't be a good option for you.

  • 0 in reply to hyanaga

    Did you create the secondary UDF's as un-linked (no validation), and use a button script to dynamically invoke the different UDT lookups (based on the primary UDF value) returning the selected value to a generic categorical UDF?  If so, that is a creative strategy I've never thought of / attempted.  I've read about someone using that kind of function in different scripts (...I think the example I remember was an ItemCode returned into a UDF), but hadn't thought of using invoked lookups that way.  I wonder if it could work for unlinked UDT's.

    Otherwise, having multiple UDF's, for each combination... just prompting for the correct list based on selection... I'd say using the data would get a lot harder that way (with the color value stored in potentially many different UDFs).

Reply
  • 0 in reply to hyanaga

    Did you create the secondary UDF's as un-linked (no validation), and use a button script to dynamically invoke the different UDT lookups (based on the primary UDF value) returning the selected value to a generic categorical UDF?  If so, that is a creative strategy I've never thought of / attempted.  I've read about someone using that kind of function in different scripts (...I think the example I remember was an ItemCode returned into a UDF), but hadn't thought of using invoked lookups that way.  I wonder if it could work for unlinked UDT's.

    Otherwise, having multiple UDF's, for each combination... just prompting for the correct list based on selection... I'd say using the data would get a lot harder that way (with the color value stored in potentially many different UDFs).

Children