cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create the link for the lookup table???

former_member207329
Participant
0 Kudos

Hi MDM guru,

I use JAVA API for MDM 5.5 sp4.

I have this structure;

Main table-> Customer

Main table fields are: Name (string),City (string) and Type (lookup flat)

Lookup table-> Type

Lookup table field is: Name and its possible values are: "A", "B","C"

When I create a new record in Main table I use the following code:

A2iFields flds = new A2iFields();

flds.Add(new A2iField(NAME, new Value(NAME));

flds.Add(new A2iField(CITY, new Value(CITY));

int pos = objCatalodData.AddRecord(<main table>, fields, posParent, 0);

Question: How can I create the link for the <b>Type</b> lookup table???

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rocco,

1. Perform a search in the lookup table and get the record id for the record you want to link to - "A", "B" or "C".

2. Take this record id, and use it as the value for the field Type.

flds.Add(new A2iField(TYPE, new Value(recordID));

Hope this helps,

Richard

former_member207329
Participant
0 Kudos

Thanks for your help, Richard.

The problem was the "Unique field" value for ever fields in lookup table.

I put <b>Unique field=true</b> and now it's works.

Best regards

Answers (0)