Maximo

Maximo

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

 View Only
Expand all | Collapse all

Locations Drilldown in SRMOBILE.

  • 1.  Locations Drilldown in SRMOBILE.

    Posted Wed October 16, 2024 07:23 AM

    Hello everyone,

    I'm asking about how to adjust the location drilldown to display locations based on the chosen classification, so for example if i chose classification (Plumbing) and then i choose water issue as a sub category, i get locations based on the category not the sub category. 

    I think i can summarize my question in the following "Can i capture from the srmobile the chosen parnet classification (first level) so later i can display locations with a query based on this classification in the form "

    Thanks in advance!



    ------------------------------
    Mostafa Mosaad
    Software Engineer
    Megasoft
    Cairo
    01117275779
    ------------------------------


  • 2.  RE: Locations Drilldown in SRMOBILE.

    Posted Thu October 17, 2024 02:04 AM

    Not sure I fully understand your question here - the classification you select in SRMOBILE is the category of the issue/request and not the classification of the location?

    Are you trying to search for service requests the user created by classification on the SRMOBILE application?



    ------------------------------
    Steve Lee
    Maximo Technical Sales Specialist
    IBM
    Leeds
    ------------------------------



  • 3.  RE: Locations Drilldown in SRMOBILE.

    Posted Thu October 17, 2024 06:12 AM
    Edited by Mostafa Mosaad Thu October 17, 2024 08:52 AM

    Dear Steve,

    Thank you for your response. Yes, the classification I choose initially represents the category of the issue/request. Here’s what I want to achieve:

    For example, if the user selects Plumbing as the category of the issue/request, the location drilldown should display only the locations that match a specific query I’ve set on the locations object, rather than showing all locations.

    Essentially, if the user selects category A for the issue/request, only locations with the loctype attribute set to C should appear. Similarly, if they choose category B, only locations with loctype set to E should be displayed.



  • 4.  RE: Locations Drilldown in SRMOBILE.

    Posted Fri October 18, 2024 03:55 AM

    OK so I think I now understand - the SRMOBILE application out of the box uses a data query called 

    MOBILELOCATION on the MXAPIOPERLOC business object BUT i think this may also be used by other mobile applications as well. I believe what would be needed is to add a filter to this data set added in the SRMOBILE app.xml based on the selected SR classification. There is a
    <maximo-datasource-override id="locationFilterDS" section in the SRMOBILE app.xml but would need some code adding to this to add your filter.
    I not fully aware of how this could be achieved using your mapping between the selected SR classification and the TYPE attribute on the Location so will try and forward this to one of our mobile experts to try and get some direction.


    ------------------------------
    Steve Lee
    Maximo Technical Sales Specialist
    IBM
    Leeds
    ------------------------------



  • 5.  RE: Locations Drilldown in SRMOBILE.

    Posted Sun October 20, 2024 04:12 AM

    Dear @Steve Lee,

    That's exactly what am trying to do and have an issue with, How to capture the current selected category on a ticket on the srmobile that is not submitted yet and based on this selected category on the issue/request a specific locations appear based on a filter (Query Definition) on the MXAPIOPERLOC.

    Thanks for forwarding this issue to the mobile team, Your help means a lot as this is a critical request that we need to achieve.

    BR



    ------------------------------
    Mostafa Mosaad
    Software Engineer
    Megasoft
    Cairo
    01117275779
    ------------------------------



  • 6.  RE: Locations Drilldown in SRMOBILE.

    Posted Sun October 20, 2024 05:43 AM

    Dear @Steve Lee,

    Adding to the above my case now is that i don't know how to query or capture from the MXAPIOPERLOC (Locations) object the structure the current classstructureid of the ticket so later based on the classification of the ticket from example the same locations with the same classstructure appear only

    BR



    ------------------------------
    Mostafa Mosaad
    Software Engineer
    Megasoft
    Cairo
    01117275779
    ------------------------------



  • 7.  RE: Locations Drilldown in SRMOBILE.

    Posted Tue November 05, 2024 05:28 AM

    Dear @Steve Lee,

    I hope you are doing well,

    I was wondering if you came across any possible way regarding filtering the locations based on the chosen classification on SRMOBILE,

    Thanks in advance.



    ------------------------------
    Mostafa Mosaad
    Software Engineer
    Megasoft
    Cairo
    01117275779
    ------------------------------



  • 8.  RE: Locations Drilldown in SRMOBILE.

    Posted Tue November 05, 2024 05:35 AM

    I did get a response from the development team with a suggestion but I have tried this and still not got this working - I will chase again and see if I can make any further progress



    ------------------------------
    Steve Lee
    Maximo Technical Sales Specialist
    IBM
    Leeds
    ------------------------------



  • 9.  RE: Locations Drilldown in SRMOBILE.

    Posted Tue November 05, 2024 05:55 AM

    Thanks a lot for your time and effort, i really do appreciate it 



    ------------------------------
    Mostafa Mosaad
    Software Engineer
    Megasoft
    Cairo
    01117275779
    ------------------------------



  • 10.  RE: Locations Drilldown in SRMOBILE.

    Posted Tue November 05, 2024 09:15 AM

    So after some testing I can get this working on the Location Search so it only returns locations that have the same classification as selected on the SR. The Location Hierarchy DrillDown will not work with this filter as it always looks at each level starting at the top level locations e.g. where location.parent is null and these would not all have the same classification.

    To get the location search to work in this way you need to add the following 3 changes:

    1) The first change is to run the following sql statement against the database because by default the objectstructure excludes the CLASSSTRUCTUREID from the object so we need to have it included to use it in our query:

    delete from MAXINTOBJCOLS where INTOBJECTNAME='MXAPIOPERLOC' and objectname='LOCATIONS' and name='CLASSSTRUCTUREID'

    2) search for the following: <maximo-datasource-override id="locationFilterDS" and the where clause as per below:

    <maximo-datasource-override id="locationFilterDS" selection-mode="multiple" offline-immediate-download="true" lookup-data="true" page-size="15" where="classstructureid=&quot;{app.state.selectedSubCategory}&quot;"/>
    3) Search for the following: 
    <lookup-with-filter id="locationLookup" width="99" datasource="locationLookupDS" and change to the below:
    <lookup-with-filter id="locationLookup" width="99" datasource="locationFilterDS"
    Let me know if this at least gives you a good starting point


    ------------------------------
    Steve Lee
    Maximo Technical Sales Specialist
    IBM
    Leeds
    ------------------------------



  • 11.  RE: Locations Drilldown in SRMOBILE.

    Posted Tue November 05, 2024 09:45 AM

    Dear Steve,

    Thanks a lot for your fast response,

    As you mentioned and this does make a lot of sense the drilldown now will not work because i can't set more than 1 classstructureid to the first level location, i did try to adjust the mobilelocation query detention in the mxapioperloc so i can write my condition and then make OR statements to include the parents that will be in more than 1 classification but with no luck because i can't hold the :classstructureid

    but your help is highly appreciated and i appreciate the time you spent, i will try to continue from the point you provided above to make it more dynamic and try to not lose the functionality of the Drilldown and also handle the case if the location should appear for 2 classifications for example.

    Thanks a lot for you help.



    ------------------------------
    Mostafa Mosaad
    Software Engineer
    Megasoft
    Cairo
    01117275779
    ------------------------------