on 03-23-2009 10:24 AM
I have retrieved the record I am looking for from my main table using the MDM API - One of the fields of the main table is a flat lookup field. If I use getLookupDisplayValue(), it returns something like "TU, Turkey". The actual lookup table consists of fields "code" and "name". I only want to fetch the "code" value - Not a comma separated value which includes the name value.
So my main table name is "plant_extensions", and the lookup table name is "enterprises".
I have tried to use the following code:
...
Record rcArray[] = plant_record.findLookupRecords(field_id);
This returns only one value which is correct. I then want to get the value in the "code" field of the lookup table, so I do the following:
rcArray[0].getLookupDisplayValue(getFieldId("lookup_table_name", "code");
For some reason, it won't accept this field ID - It says that it has not been maintained, or does not exist.
Am I doing this the correct way, or is there a better way to do this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
when all the lookup records are retrived, as you did by the below code.
Record rcArray[] = plant_record.findLookupRecords(field_id);
The Display value and the lookup Id can be retrived as follows:-
Display value = rcArray[0].getDisplayValue();
Lookup Id = rcArray[0].getId();
Hope it helps.
Regards,
Neeharika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.