Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only

Filtering attachment dataset on Mobile side not working

  • 1.  Filtering attachment dataset on Mobile side not working

    Posted Thu January 18, 2024 02:10 AM

    Hello All,

    I am trying to get filtering of a (custom) dataset of attachments working on Mobile.
    On the Rolebased application side it is working perfectly, but after publishing and testing Mobile displays all the attachments instead of (for example 3 attachments out of 5).

    Some thing I tried.

    <maximo-datasource id="attachmentList" relationship="doclinks" attachment="true" page-size="250" selection-mode="none">
      <schema id="jxrn4">
    <attribute name="*" unique-id="true" id="mbqx3"/>
      </schema>
      <qbe id="dam_vw_najey">
    <qbe-field name="printthrulink" value="1" id="dam_vw_d9m2q"/>
      </qbe>
    </maximo-datasource
    and:
    <maximo-datasource id="attachmentList" relationship="doclinks" attachment="true" page-size="250" selection-mode="none">
      <schema id="jxrn4">
        <attribute name="*" id="vw_mja">
          <maximo-child-filter related-path="doclinks" where="printthrulink=&quot;1&quot;" id="jezja3"/>
        </attribute>
      </schema>
    </maximo-datasource>
    also filering through AppCustomizations.js like:

      async onAfterLoadData(datasource, item, query) {
        if (datasource.name === 'attachmentList') {
          datasource.setQBE('printthrulink', '=', '1');
          await datasource.searchQBE();
        }

    }
    The above examples all are working on Rolebased, but not on mobile.
    The ultimate goal is filtering on urlType, but that is a non persistent field (so I will worry about that later).

    The whole piece of code is:
    <maximo-datasource id="workOrderAttachmentResource" default="true" object-structure="mxapiwodetail">
    <schema id="j2d__">
      <attribute name="wonum" id="xbmn_"/>
      <attribute name="description" id="nqz35"/>
      <attribute name="workorderid" unique-id="true" id="p67dz"/>
    </schema>
      <maximo-datasource id="attachmentList" relationship="doclinks" attachment="true" page-size="250" selection-mode="none">
        <schema id="jxrn4">
      <attribute name="*" unique-id="true" id="mbqx3"/>
         </schema>
        <qbe id="dam_vw_najey">
         <qbe-field name="printthrulink" value="1" id="dam_vw_d9m2q"/>
       </qbe>
       </maximo-datasource>
    </maximo-datasource>
    <panel id="vn25k">
            <attachment-list datasource="attachmentList" hide-when-empty="false" show-search="false" show-managed-header="true" is-editable="{page.state.addattachmentAccess}" allow-naming="true" id="rvqjg"/>
     .... 
    ....
    ..
    Could it be that Mobile only looks at relationship="doclinks" and then skips all the filtering provided by the app.xml?
    Also tried it with a Datalist. I get the same behaviour there.

    Things I also tried are:
    - mobile-qbe-filter="......"
    - where="......"

    If anyone has ideas please share them.

    Regards,
    Vincent Wanders


    ------------------------------
    Vincent Wanders
    ------------------------------