cancel
Showing results for 
Search instead for 
Did you mean: 

getting data of specified field of type look up from record

Former Member
0 Kudos

Hi

I have to retrive the data of a particular field from a record but the field type is LookUP[Qualified Flat](multivalued). I can able to get it if field type is String,.

I am using this

RecordResultSet temprs= temprecords.getRecords();

MdmValue res = temprs.getRecords()[0].getFieldValue(FieldID);

if field type is string i can by res.toString(), but here field type is LookUP.

Regards,

Sandeep.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You will have to use the method getLookupDisplayValue instead of getFieldValue... to get the respective Lookup value for any lookup field.

The method getLookupDisplayValue returns value only if the setsupportingResultDefinition has the lookup table defintion and passed to the class retrieverecordscommand or any other.

Thanks,

Priya.

Former Member
0 Kudos

Here is the sample code on how to get the qualified lookup values:

QualifiedLookupValue facilityQualifierLookUpValue = (QualifiedLookupValue) rec.getFieldValue(Items.FAC_ITEM_ID);

QualifiedLinkValue[] facQualifiedLinkValues = facilityQualifierLookUpValue.getQualifiedLinks();

QualifiedLinkValue linkValue =facQualifiedLinkValues[0];

linkValue.getQualifierValue(FAC_ITEM_START_DATE_ID) will give you the qualifier values from qualifier table for that link.

Hope that helps!