Record Query Based On Perspectives

You can query for records bundled into a particular perspective. The perspective name must be passed as one of the context variable and depending on the type of relationship and the depth of relationship.

The following table provides the details of relationship type:

Relationship Type for Perspective and Description
Relationship Type Description
ALL All the records bundled into the perspective until the specified depth are returned.
RelationshipName which is in the perspective The related records pertaining to that relationship are returned.
RelationshipName which is not in the perspective Only the root record is returned.

Refer to the following request example:

    <DataService version="2" 
      <Identity>
        <DirectoryPath>
          <Directory type="Enterprise">Tech</Directory>
          <Directory type="User">jsmith</Directory>
        </ns0:DirectoryPath>
        <Authentication type="Password">jsmith</Authentication>
      </Identity>
      <Context>
        <Variable name="PERSPECTIVENAME" type="string">personalInfoPersp</Variable>
      </Context>
      <Transaction>
        <Command type="Query">
          <MaxCount>10</MaxCount>
          <MasterCatalogRecord etype="Entity">
            <ExternalKeys>
              <Key name="MASTERCATALOGNAME">PERSON</Key>
              <Key name="PRODUCTID">p1</Key>
            </ExternalKeys>
            <Return>
              <RelationshipData>
                <Relationship>
                  <RelationType>ALL</RelationType>
                  <RelationDepth>3</RelationDepth>
                </Relationship>
              </RelationshipData>
            </Return>
          </MasterCatalogRecord>
        </Command>
      </Transaction>
    </DataService>
Note: If you specify PERSPECTIVENAME context variable in the Record Query web service, only those attributes are returned which are specified in the perspective.