Maximo

 View Only

 Make Location Required on SRMOBILE in MAF

Mostafa Mosaad's profile image
Mostafa Mosaad IBM Champion posted 01/14/25 01:57 AM

Dears,

I hope you are all doing well!

I want to make the Location Field (Which is the drilldown in the SRMOBILE form) to be required so the user can't submit the request until he selects a location on the SR form.

do anyone have an idea of how to make it possible?, your help is highly appreciated.

BR.

Bartosz Marchewka's profile image
Bartosz Marchewka IBM Champion

Hi Mostafa,

Don't know exactly which version of Mobile do you have but in v9 you can manage to do that by these changes:

  1. Find page id="createSR" and in the section state name="isRequired" change boolean value from false to true for state name="location".
    <page id="createSR" title="New request" hidden="{!page.state.canLoad.page}" controller="CreateSRController">
          <states id="a8pz5">
            (...)
            <state name="isRequired" type="object" id="jwje3">
              (...)
              <state name="location" type="boolean" value="true" id="wv5g6"/>
              (...)
            </state>
          </states>
    </page>
  2. Mark "Location" field as required (blue dot will be visible close to the field). To do that please add required tag required="{page.state.isRequired.location}" for label: 
    <page id="createSR" title="New request" hidden="{!page.state.canLoad.page}" controller="CreateSRController">
        (...)
        <label label="Location" tooltip-text="Identifies the location for the ticket." required="{page.state.isRequired.location}" id="ya5q6"/>
        (...)
    </page>