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

Posted

技术标签:

【中文标题】Maximo Anywhere 7.6 - 查找选择未显示在字段中【英文标题】:Maximo Anywhere 7.6 - Lookup selection not displayed in the field 【发布时间】:2016-06-29 16:45:07 【问题描述】:

我创建了一个查找并能够查看数据。但是,当在查找中选择了一个条目时,该选择不会显示在前一个屏幕中。下面是代码sn-ps。

查看:

<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"/>

您能帮我解决这个问题吗?我已经为此苦苦挣扎了一段时间。

问候, 卡提克

【问题讨论】:

【参考方案1】:

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

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

【讨论】:

谢谢斯科特。有效。是否有可用的文档解释 app.xml 标签的使用及其属性? 很遗憾还没有。

以上是关于Maximo Anywhere 7.6 - 查找选择未显示在字段中的主要内容,如果未能解决你的问题,请参考以下文章

Maximo Anywhere - 调试

Maximo Anywhere 自定义下拉菜单

Maximo Anywhere 登录

Maximo Anywhere 多语言

Maximo Anywhere 登录问题

Maximo Anywhere 搜索 WO