Displaying data on a catalog item reference field by extracting from a custom table

Sam10
Tera Expert

 

Hi All

 

 

I have a custom table called "u_abcd" and this has fields

 

  •  "code"
  •  "name"

 

There are about 50k records in this table. Relationship between "code" and "name" is 1 to Many (Example: code=0001 : name = boston1, boston2, boston3, houston1, houston2).

In a catalog item, I have two reference fields pointed to this table and the fields are "code" and "name". 


Requirement:

I need to show unique values for "code" and then once a selection is made for the "code", show "name" values that are tied to the "code" selected above. So far, I can populate "code" values in the "code" reference field on catalog item but it shows duplicate values (0001, 0001, 0001 for each of the rows). 

 

What's the best approach to achieve this?

 

 

Thanks!

1 REPLY 1

Sam10
Tera Expert

anyone? 

one approach I came across is the use of a script include to extract data from the table and filter it and call it using a ref qualifier within the variable. Is there a better way to achieve this?