Articles about European Sharepoint Hosting Service
Sharepoint 2013 Hosting – HostForLIFE.eu :: Search Database Related Tables Using BCS
Configure BCS to search a Database, where the Tables have a parent-child relationship. When searching for any term within the child table, the item linked in the parent item has to be displayed on the result page then the searched term or item from the child table.
The requirement makes sense in a way, that the child tables are considered as paragraphs within a document. When searching for a term within the paragraph, you would expect the link to the document to be displayed. After all, the child tables will always be additional information about the parent item.
Design
While designing for this requirement the data to be retrieved from the parent table and the child table has to be from two different entities, however, they need to be within the same LOBInstance.
By which, we have control to define the association between these entities within the Model.
Here is how the Method and the method instance need to be defined.
1 |
<Method Name=”PartItemToRevisionItem”> <Properties> <Property Name=”HideOnProfilePage” Type=”System.Boolean”>true</Property> </Properties> <Parameters> <Parameter Name=”partID” Direction=”In”> <TypeDescriptor Name=”PartID” TypeName=”System.String” IdentifierEntityName=”PartItem” IdentifierEntityNamespace=”MultiBCS.MultiEntity” IdentifierName=”PartID” ForeignIdentifierAssociationName=”PartItemToRevisionItem” /> </Parameter> <Parameter Name=”revisionAssociationItemList” Direction=”Return”> <TypeDescriptor Name=”RevisionItemList” TypeName=”MultiBCS.MultiEntity.RevisionItem[], MultiEntity” IsCollection=”true”> <TypeDescriptors> <TypeDescriptor Name=”RevisionItem” TypeName=”MultiBCS.MultiEntity.RevisionItem, MultiEntity”> <TypeDescriptors> <TypeDescriptor Name=”RevisionID” TypeName=”System.String” IdentifierEntityName=”RevisionItem” IdentifierEntityNamespace=”MultiBCS.MultiEntity” IdentifierName=”RevisionID” /> <TypeDescriptor Name=”Revision_Name” TypeName=”System.String” /> <TypeDescriptor Name=”Revision_Cost” TypeName=”System.Int32″ /> <TypeDescriptor Name=”PartID” TypeName=”System.String” /> <TypeDescriptor Name=”Revision_Type” TypeName=”System.String” /> </TypeDescriptors> </TypeDescriptor> </TypeDescriptors> </TypeDescriptor> </Parameter> </Parameters> <MethodInstances> <Association Name=”PartItemToRevisionItem” Type=”AssociationNavigator” ReturnParameterName=”revisionAssociationItemList” IsCached=”false”> <Properties> <Property Name=”AttachmentAccessor” Type=”System.String”></Property> </Properties> <SourceEntity Name=”PartItem” Namespace=”MultiBCS.MultiEntity” /> <DestinationEntity Name=”RevisionItem” Namespace=”MultiBCS.MultiEntity” /> </Association> </MethodInstances> </Method> |
The association method can be written in any entity (parent or child). But the tag that defines the source and the destination can be seen within the MethodInstance.
Silver Bullet
Of all this requirements, the most important part and the one that defines that the child tables need to be crawled as attachments, by which I mean that “when searched for a term in the child table, the item linked in the parent table to be displayed”. The below tag needs to be added within the method instance, otherwise multiple results will be displayed for a single record, which is unwanted.
1 |
<Property Name=”AttachmentAccessor” Type=”System.String”></Property> |
Thanks to Scott Hillier to the right pointer on the “Attachment Accessor” which is significant for this requirement.
SharePoint 2013 Hosting Recommendation
HostForLIFE.eu’s SharePoint 2013 Hosting solution offers a comprehensive feature set that is easy-to-use for new users, yet powerful enough for the most demanding web developer expert. Hosted SharePoint Foundation 2013 is the premiere web-based collaboration and productivity enhancement tool on the market today. With SharePoint 2013 Foundation, you can quickly access and manage documents and information anytime, anywhere though a Web browser in a secure and user friendly way. SharePoint hosting services start at only at €9.99/mo, allowing you to take advantage of the robust feature set for a small business price. HostForLIFE.eu offers a variety of hosted SharePoint Foundation 2013 plans as well as dedicated SharePoint 2013 Foundation options
Print article | This entry was posted by Peter on March 8, 2019 at 4:48 am, and is filed under European SharePoint 2013 Hosting. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |