How to hide/View Relationship Attribute based on Parent Repository Attribute value

How to hide/View Relationship Attribute based on Parent Repository Attribute value

book

Article ID: KB0077382

calendar_today

Updated On:

Products Versions
TIBCO MDM 9.1.0

Description

We may have a use case to Hide relationship attribute as make it as view only by considering the value of one of the attribute(PRODUCT_TYPE) in the Parent(ITEM_HIERARCHY) Repository.

Suppose,We Have a Repository Called ITEM_HIERARCHY having Self Relationship Contains and ContainedBy along with a Relationship attribute as 'Quantity'.I need to make Quantity Attribute as value only or hide the same if PRODUCT_TYPE(One of the Attribute in Root Repository) value is 'EA'.

RA with Edit Access Mode

 

Issue/Introduction

Make relationship attribute as view only or Hide by considering the parent repository attribute in a self relationship repository model.

Environment

ALL

Resolution

To achieve this use case,We need to use below constraints in Relationship catalog(rct_*) to restrict the access mode of 'Quantity' Attribute.

<constraint>
    <name>PRODUCT TYPE Access Mode</name>
    <description>If Product Type is EA then the access for Quantity attribute is view only.</description>
    <condition>
        <eq>
            <var>PARENT/PRODUCT_TYPE</var>
            <const type="string">EA</const>
        </eq>
    </condition>

<action>
        <access mode="view">QUANTITY</access>
    </action>
</constraint>

With above constraint,we can make the Relationship Access mode to view only as below.

RA View Access Mode


We can hide the Relationship Attribute by using below Constraint.

<constraint>
    <name>PRODUCT TYPE Access</name>
    <description>If Prodcut Type is EA then the access for contains Quantity to view only.</description>
    <condition>
        <eq>
            <var>PARENT/PRODUCT_TYPE</var>
            <const type="string">EA</const>
        </eq>
    </condition>

<action>
        <access mode="hide">QUANTITY</access>
    </action>
</constraint>

User-added image

Additional Information

01792964,https://docs.tibco.com/pub/mdm/9.1.0/doc/html/GUID-60B05A76-5663-4154-9F9C-B9369AE32834.html 

Attachments

How to hide/View Relationship Attribute based on Parent Repository Attribute value get_app
How to hide/View Relationship Attribute based on Parent Repository Attribute value get_app
How to hide/View Relationship Attribute based on Parent Repository Attribute value get_app