Technical Blog Post
Abstract
Record hovering using custom relationship
Body
When you have created a custom relationship on Maximo objects. You may wonder how the data information can be displayed by hovering the field. For an example if you want to display the PR Line Item record hovering. The custom relationship can be used with PRLINE object relationship to INVENTORY to retrieve storeroom item information. By doing that the hovering may display “Invalid Bindings” on the field information. The reason why it's displaying “Invalid Binding” is the relationship needs to be at the recordhover element level, not the recordhoversection level on RECHOVERS.xml file.
Create a relationship on PRLINE object relationship PRL_INVENTORY on INVENTORY.
Where clause itemnum=:itemnum and itemsetid=:itemsetid and location=:storeloc and siteid=:siteid
Go to Application Designer
Bring up the PR application
Select the item field right click go to properties
Add the below information Hover Window ID PRLITEM_RECORDHOVER
Hover Window Attribute PRL_INVENTORY.ITEMNUM
Now export the RECHOVERS system XML file and add the below.
<!-- New added -->
<recordhover id="PRLitem_recordhover" relationship="PRL_inventory">
<recordhoversection id="prl_item_rhs_1" label="Item Details">
<recordhoversectioncol id="prl_item_rhsc_1">
<recordhoversection id="prl_item_rhs_2">
<recordhovermultiparttextbox dataattribute="item.itemnum" descdataattribute="item.description" id="prl_item_rh_1" label="Item"/>
<recordhovertextbox dataattribute="minlevel" id="prl_item_rh_4" label="Min Reorder Point"/>
<recordhovertextbox dataattribute="orderqty" id="prl_item_rh_5" label="Economic Order Qty."/>
<recordhovertextbox dataattribute="binnum" id="prl_item_rh_11" label="Bin"/>
</recordhoversection>
</recordhoversectioncol>
<recordhoversectioncol id="prl_item_rhsc_2">
<recordhoversection id="prl_item_rhs_3">
<recordhovertextbox dataattribute="invbalances.curbal" id="prl_item_rh_2" label="Current Balance"/>
<recordhovertextbox dataattribute="lastissuedate" id="prl_item_rh_6" label="Last Issue Date"/>
<recordhovertextbox dataattribute="issueytd" id="prl_item_rh_7" label="Year to Date"/>
<recordhovertextbox dataattribute="issue1yrago" id="prl_item_rh_8" label="Last Year"/>
<recordhovertextbox dataattribute="issue2yrago" id="prl_item_rh_9" label="2 Years Ago"/>
<recordhovertextbox dataattribute="issue3yrago" id="prl_item_rh_10" label="3 Years Ago"/>
</recordhoversection>
</recordhoversectioncol>
</recordhoversection>
</recordhover>
Note : The relationship entered in the header level if the relationship used in the recordhoversection it will have invalid bindings. If you had as below:
<!-- New added -->
<recordhover id="PRLitem_recordhover">
<recordhoversection id="prl_item_rhs_1" label="Item Details" relationship="PRL_inventory">
<recordhoversectioncol id="prl_item_rhsc_1">
<recordhoversection id="prl_item_rhs_2">
After adding the PRLitem_recordhover to the XML save and import.
Now go to PR application, bring up a record
Hover to the Item field the information correctly displayed.
UID
ibm11130013