Getting values from relationship attributes in Information Server

12 Views Asked by At

I am unable to get the values from Relationship Attributes using the method getAttributeValue().

I understand this function is the traditional way but are there any alternate methods or workarounds?

1

There are 1 best solutions below

0
On

getAttributeValue() returs database ID of relationship item. You can use functions below to work with a relationship attribute:

getEntryRelationshipAttrib

String[] Entry::getEntryRelationshipAttrib(String sAttribPath)

Given a relationship attribute path, returns an array of length 2 containing: [0]=Related Item's Catalog's Name, [1]=Related Item's Primary Key, for the related item. Exception will be thrown if attribute sAttribPath doesn't exist or it's not of relationship type

getItemUsingEntryRelationshipAttrib

Item Entry::getItemUsingEntryRelationshipAttrib(String sAttribPath)

return the related item object for given relationship attribute path. Exception will be thrown if attribute sAttribPath doesn't exist or it's not of relationship type