cancel
Showing results for 
Search instead for 
Did you mean: 

getting the name of the column using MDM API

Former Member
0 Kudos

Hi I want to know the Column name from fieldId, can any one help me on this. I am using the following code to get the data but i nedd column name to which the data is refering

ArrayList mdmData=new ArrayList();

RecordResultSet rs=(RecordResultSet)obj;

FieldId field[];

for(int i=0;i<rs.getRecords().length;i++)

{

field=rs.getRecords()<i>.getFields();

for(int j=0;j<field.length;j++)

mdmData.add(rs.getRecords()<i>.getFieldValue(field[j]));

}

Regards,

Sandeep

Accepted Solutions (1)

Accepted Solutions (1)

namrata_d
Active Participant
0 Kudos

Hi Sandeep,

When you fetched the FieldID from FieldProperties object. There is one more method to this class named FieldProp.getName(). This returns you the Name of the Field. You can store that too if you need it later.

Thanks

Namrata

Answers (1)

Answers (1)

Greg_Austin
Active Participant
0 Kudos

Take a look at the RepositorySchema class. There is a method getField that takes a TableId and FieldId as parameters and returns a FieldProperties object. With the FieldProperties object you can get the name, field type, etc.

-Greg