Maximo

Maximo

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

 View Only
  • 1.  Edit MAXVARS data via UI

    Posted Wed October 06, 2021 11:52 PM
    MAM 7.6.1.2:

    I want to add a row to the MAXVAR table via the Maximo UI.



    Is there a way to do that?

    Thanks.
    #Maximo
    #AssetandFacilitiesManagement


  • 2.  RE: Edit MAXVARS data via UI

    Posted Thu October 07, 2021 05:38 AM
    I am afraid that isn't an option. They are meant to be configuration elements accessed mostly by the system.

    If you are planning to store a key-value pair somewhere for future references, you can use system properties instead which will allow you to amend values from the UI.

    If you still like to use maxvars and don't have access to the DB to amend them, you can do it through MXLoader using the below approach.

    http://vietmaximo.blogspot.com/2018/07/how-to-modify-almost-any-maximo-data.html

    Thanks

    ------------------------------
    Arun
    ------------------------------



  • 3.  RE: Edit MAXVARS data via UI

    Posted Thu October 07, 2021 08:27 AM
    I've never tried this but I think you can add it as a non-persistent attribute to the MAXVARINPUT (with the same attribute name as the VARNAME) and add it to a dialog in the Organization application. I believe that will cause it to reload the cache for it.

    I personally would go the system property route, especially for things that are global like environment name.

    ------------------------------
    Steven Shull
    ------------------------------



  • 4.  RE: Edit MAXVARS data via UI

    Posted Sun October 10, 2021 12:03 AM
    For what it's worth, I tried creating a custom dialog in Database Configuration. The dialog pops up just fine, but I can't seem to edit or create MAXVARS.

    I get an error:
    BMXAA4116E - Maxvar type is not valid. It is either not specified, or not one of the "SYSTEM", "ORG" or "SITE". Update the MAXVAR table by ensuring that the given MAXVAR is either a SYSTEM, ORG or SITE level maxvar.



    Steps:

    1. Add a dialog to CONFIGUR.XML (Database Configuration application).

     

                    <dialog id="EDITVARS" label="Edit MaxVars" mboname="MAXVARS">
                                    <section border="true" id="editvars_grid4">
                                                    <table id="editvars_grid4_1_1_Table">
                                                                    <tablebody displayrowsperpage="8" filterable="true" id="editvars_grid4_1_1_Table_tablebody">
                                                                                    <tablecol filterable="false" hidden="false" id="editvars_grid1a_1_1_table2_tablebody_0" mxevent="toggledetailstate" mxevent_desc="Show Detail" sortable="false" type="event"/>
                                                                                    <tablecol dataattribute="varname" id="editvars_grid4_1_1_Table_tablebody_2"/>
                                                                                    <tablecol dataattribute="vartype" id="editvars_grid4_1_1_Table_tablebody_3"/>
                                                                                    <tablecol dataattribute="varvalue" id="editvars_grid4_1_1_Table_tablebody_44"/>
                                                                                    <tablecol dataattribute="siteid" id="editvars_grid4_1_1_Table_tablebody_4" sortable="false"/>
                                                                                    <tablecol dataattribute="orgid" id="editvars_grid4_1_1_Table_tablebody_6" sortable="false"/>
                                                                                    <tablecol filterable="false" hidden="false" id="editvars_grid4_1_1_Table_tablebody_5" mxevent="toggledeleterow" mxevent_desc="Mark Row for Delete" mxevent_icon="btn_garbage.gif" sortable="false" type="event"/>
                                                                    </tablebody>
                                                                    <tabledetails id="editvars_grid1a_1_1_table2_tabledetails">
                                                                                    <section border="true" id="editvars_grid1a_1_1_table2_grid2">
                                                                                                    <sectionrow id="editvars_grid1a_1_1_table2_grid2_row1">
                                                                                                                    <sectioncol id="editvars_grid1a_1_1_table2_grid2_row1_col1">
                                                                                                                                    <section id="editvars_grid1a_1_1_table2_grid2_row1_col1_sec1">
                                                                                                                                                    <textbox dataattribute="varname" id="editvars__grid1a_13_1_grid2_1"/>
                                                                                                                                                    <textbox dataattribute="vartype" id="editvars__grid1a_13_1_grid2_12"/>
                                                                                                                                                    <textbox dataattribute="varvalue" id="editvars__grid1a_13_1_grid2_1111"/>                                                                                                                                         
                                                                                                                                    </section>
                                                                                                                    </sectioncol>
                                                                                                                    <sectioncol id="editvars_grid1a_1_1_table2_grid2_row1_col2">
                                                                                                                                    <section id="editvars_grid1a_1_1_table2_grid2_row1_col1_sec2">
                                                                                                                                                    <textbox dataattribute="siteid" id="editvars__grid1a_13_1_sec2_grid2_1"/>
                                                                                                                                                    <textbox dataattribute="orgid" id="editvars__grid1a_13_1_sec2_grid2_12"/>
                                                                                                                                    </section>
                                                                                                                    </sectioncol>
                                                                                                    </sectionrow>
                                                                                    </section>
                                                                    </tabledetails>
                                                                    <buttongroup id="editvars_11buttongrid1">
                                                                                    <pushbutton default="true" id="editvars___table_buttongroup_2" label="New Row" mxevent="addrow"/>
                                                                    </buttongroup>
                                                    </table>
                                    </section>
                                    <buttongroup id="editvars_11_buttongrid1">
                                                    <pushbutton default="true" id="editvars___33_buttongrid1_1" label="OK" mxevent="dialogok"/>
                                                    <pushbutton id="editvars___44_buttongrid1_2" label="Cancel" mxevent="dialogcancel"/>
                                    </buttongroup>
                    </dialog>

                   

      2. Create a new sigoption: EDITVARS (Description: Edit MaxVars)

      3. Create a new action menu entry the with sigoption 'EDITVARS'.
      4. Give myself security for the sigoption.
      5. Log out and in again.
      6. Open the new dialog (action in Database Configuration)






    1. 5.  RE: Edit MAXVARS data via UI

      Posted Mon October 11, 2021 09:47 AM
      Sorry my previous message wasn't very clear. After you've defined a MAXVAR in the database, Maximo utilizes MAXVARINPUT (which is a non-persistent object) to manage the cache aspect of it when they expose it in the UI. They create relationships from ORGANIZATION to MAXVARINPUT (such as for the Asset Options dialog they use the relationship MAXVARINPUTASSET). Then they create a dialog for it in the Organizations (MULTISITE) application, referencing this relationship to the non-persistent MAXVARINPUT. 

      If you're trying to create a new MAXVAR, you would need to add it to MAXVARTYPE (not MAXVARS) initially. I'm not sure whether that would work or not (I've never tried to define one from the front end). I just know if you want to update it properly (so the cached value is managed) you want to use MAXVARINPUT non-persistent. 


      ------------------------------
      Steven Shull
      ------------------------------