Maximo Anywhere 7.6 - 查询选择未在字段中显示

时间:2016-06-29 16:45:07

标签: maximo-anywhere

我创建了一个查找并能够查看数据。但是,如果在查找中选择了一个条目,则选择不会显示在上一个屏幕中。以下是代码段。

查看:

<groupitem id="ServiceRequest.CreateSR_serviceRequest_groupitem_ServiceRequest.CommodityGroup_0" >
                        <text editable="true" id="ServiceRequest.CreateSR_serviceRequest_groupitem_ServiceRequest.CommodityGroup_0_CommodityGroup" label="Service Group" lookup="ServiceRequest.CommodityGroupLookup" lookupAttribute="commodity1" placeHolder="Tap to enter" resourceAttribute="commoditygroup">
                        </text>
                    </groupitem>

查找

<lookup id="ServiceRequest.CommodityGroupLookup" label="Select Value" resource="commodityGroup">
            <requiredResources id="ServiceRequest.commodityGroupLookup_requiredResources">
                <requiredResource id="ServiceRequest.commodityGroupLookup_commodityGroup" name="commodityGroup"/>
            </requiredResources>
            <list id="ServiceRequest.CommodityGroupLookup_commodityGroup_list" resource="commodityGroup">
                <listItemTemplate id="ServiceRequest.CommodityGroupLookup_commodityGroup_listItemTemplate">
                    <listtext cssClass="bold textappearance-medium" id="ServiceRequest.CommodityGroupLookup_commodityGroup_desc" resourceAttribute="commodity"/>
                </listItemTemplate>
            </list>
            <returnAttributes id="ServiceRequest.CommodityGroupLookup_returnAttributes">
                <returnAttribute id="ServiceRequest.CommodityGroupLookup_servicegroup_description" sourceAttribute="description" targetAttribute="description1"/>
                <returnAttribute id="ServiceRequest.CommodityGroupLookup_servicegroup_category" sourceAttribute="commodity" targetAttribute="commodity1"/>
            </returnAttributes>
        </lookup>

资源:

<resource describedBy="http://jazz.net/ns/ism/asset/smarter_physical_infrastructure#Z_ODS_ServiceGroups" additionalData="true" id="commoditygroup" name="commodityGroup" pageSize="50" providedBy="/oslc/sp/SmarterPhysicalInfrastructure">
            <attributes id="commodityGroup_attributes">
                <attribute describedByProperty="spi:commoditiesid" id="commodityGroup_commoditiesid_oslccommotieisid" index="true" name="commoditiesid"/>
                <attribute describedByProperty="spi:commodity" id="commodityGroup_commodity_oslccommodity" index="true" name="commodity"/> 
                <attribute describedByProperty="spi:description" id="commodityGroup_description_oslcdescription" index="true" name="description"/>
                <attribute describedByProperty="spi:parent" id="commodityGroup_parent_oslcparent" index="true" name="parent"/>
                <attribute describedByProperty="spi:servicetype" id="commodityGroup_serviceType_oslcservicetype" index="true" name="serviceType"/>
            </attributes>
            <queryBases id="commodityGroup_queryBases">
                <queryBase id="commodityGroup_queryBase_getServiceGroups" name="getServiceGroups" queryUri="/oslc/os/z_ods_commoditygroup"/>
            </queryBases>
            <whereClause id="commodityGroup_whereClause"/><!--  clause="spi:servicetype=PROVIDE"/> -->
        </resource>  

在SR资源下:

<attribute describedByProperty="spi_wm:commoditygroup" id="serviceRequest_spi__wmcommoditygroup" index="true" name="commoditygroup"/>
你能帮帮我吗?我一直在努力解决这个问题。

此致 KARTHIK

1 个答案:

答案 0 :(得分:1)

查找的targetAttribute需要指向要存储结果的Service Request资源中的字段。看起来你应该有这个。

<returnAttributes id="ServiceRequest.CommodityGroupLookup_returnAttributes">
            <returnAttribute id="ServiceRequest.CommodityGroupLookup_servicegroup_category" sourceAttribute="commodity" **targetAttribute="commoditygroup"**/>
        </returnAttributes>