on 10-23-2008 4:56 AM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
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.