Maximo Open Forum

 View Only
  • 1.  App Designer: add CUSTOMERNUM to Inventory Screen

    Posted 03-03-2022 12:07
    Hi all,  in App Designer I am trying to add COMPANIES.CUSTOMERNUM to the one of the screens in the INVENTORY app.  But I get an Invalid Data Binding error no matter how I try it.  I see that INVENTORY has no direct relationship to COMPANIES, so it looks like I need to define one or more new relationships.  Is this right, and what would they be?
    #EverythingMaximo
    #Inventory

    ------------------------------
    Ryan Sheeler
    ------------------------------


  • 2.  RE: App Designer: add CUSTOMERNUM to Inventory Screen

    Posted 03-04-2022 08:06

    There are three relationships out of the box, though only 2 that are most likely relevant (one is for consignment which most customers don't utilize). If you're looking for details about the company assigned as the primary vendor, you can utilize:

    VENDOR.CUSTOMERNUM

    If you want the manufacturer associated to the primary vendor you can utilize:

    MANUFACTURER.CUSTOMERNUM

    If you wanted to display this in the INVVENDOR table for each one of the vendors you can use the same relationship names as above. 



    ------------------------------
    Steven Shull
    IBM
    ------------------------------



  • 3.  RE: App Designer: add CUSTOMERNUM to Inventory Screen

    Posted 03-07-2022 10:16
    Hi Steven,  Thanks for that.    I think VENDOR.CUSTOMERNUM may work I will try it.   I may also want to put a Lookup on that field into App Designer (I'll be putting the field in the Adv Search of the Inventory app and maybe somewhere else in that app).   What do I point the lookup too?  Will I need to create a new domain?

    ------------------------------
    Ryan Sheeler
    ------------------------------



  • 4.  RE: App Designer: add CUSTOMERNUM to Inventory Screen

    Posted 03-07-2022 12:46
    In Database Config looking at the INVENTORY object I see that VENDOR is related to COMPANIES (company = :vendor and orgid=:orgid), and MANUFACTURER is related to COMPANIES (company = :manufacturer and orgid=:orgid). 

    But CUSTOMERNUM is an attribute of COMPANIES and COMPMASTER; neither of which are directly related to INVENTORY.  I think that's why I'm getting the Invalid Data Binding error when I try to place the field into the screen.

    ------------------------------
    Ryan Sheeler
    ------------------------------



  • 5.  RE: App Designer: add CUSTOMERNUM to Inventory Screen

    Posted 03-07-2022 13:17

    When you call RELATIONSHIP.ATTRIBUTE you're opening the relationship to the child table. IE in this case, when you call VENDOR.CUSTOMERNUM you are opening a relationship from INVENTORY to COMPANIES based on the vendor & orgid attributes on INVENTORY matching to the COMPANY & ORGID on the COMPANIES table. You should not get an invalid binding if you use VENDOR.CUSTOMERNUM, provided that CUSTOMERNUM is on the COMPANIES table.

    I would not add a domain to this field just to support a lookup for utilizing in the advanced search. What I would suggest is utilizing the VENDOR.COMPANY field and utilizing a lookup there that includes the CUSTOMERNUM attribute. That would allow you to search in the lookup to filter for companies with that CUSTOMERNUM



    ------------------------------
    Steven Shull
    IBM
    ------------------------------



  • 6.  RE: App Designer: add CUSTOMERNUM to Inventory Screen

    Posted 03-07-2022 15:25
    Here's what I have in the Properties for that textbox with lookup.  Not sure if this is right, but it seems like the lookup should point to COMPANIES?



    ------------------------------
    Ryan Sheeler
    ------------------------------



  • 7.  RE: App Designer: add CUSTOMERNUM to Inventory Screen

    Posted 03-07-2022 16:03

    Based on what you've described, this field is free text on a company record, correct? If that's the case, you can't use a lookup on this attribute as it is today and I wouldn't recommend modifying it to support a lookup. Domains, java classes with getList, retrieve list automation scripts, etc. are the critical plumbing that makes lookups possible. Without one of them on your field you can't utilize lookups and it doesn't make sense to add them to an attribute where you aren't restricting the data.

    What you can do is display the VENDOR or MANUFACTURER attribute instead of your VENDOR.CUSTOMERNUM attribute. The VENDOR & MANUFACTURER attributes support a lookup against the company table. I mistakenly typed VENDOR.COMPANY in my earlier reply but you can't use that and wouldn't want to use that from a search performance perspective. These attributes already exist out of the box in the Advanced Search dialog.

    Lookups exist in the LIBRARY.XML or LOOKUPS.XML and are not dot notation based. If you go into Application Designer and choose Export System XML from the Select Action menu you'll be presented the option to export these two system XMLs. The one most relevant to what you want to do out of the box is in the LOOKUPS and the lookup is called COMPANIES (id="COMPANIES"). This is what we display in a lot of places inside of Maximo.

    If you modify this lookup or clone this lookup (copy and paste that lookup and change the IDs to make them unique) and add in your CUSTOMERNUM attribute you'll allow the user to filter for COMPANY records that have the CUSTOMERNUM you want. They then can select them from the dialog to return the COMPANY attribute to the VENDOR/MANUFACTURER field (or anywhere else in Maximo that lookup is referenced) and be able to filter it. 



    ------------------------------
    Steven Shull
    IBM
    ------------------------------



  • 8.  RE: App Designer: add CUSTOMERNUM to Inventory Screen

    Posted 03-07-2022 16:22
    Here is the Companies lookup.  Do I just copy this and call the ID something like Companies2 or similar?   Then I keep everything else and add in customernum attribute - of course making sure everything is unique?

    Then can I upload the LOOKUPS.xml with the Import Application Definition option?   I very rarely if ever edit the lookups so I forget.



    <table id="companies" inputmode="readonly" selectmode="single">
    <tablebody displayrowsperpage="20" filterable="true" filterexpanded="true" id="companies_lookup_tablebody">
    <tablecol dataattribute="company" id="companies_lookup_tablebody_col_0" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
    <tablecol dataattribute="name" id="companies_lookup_tablebody_col_1" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
    <tablecol dataattribute="type" id="companies_lookup_tablebody_col_2" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
    <tablecol dataattribute="orgid" id="companies_lookup_tablebody_col_3" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
    </tablebody>
    </table>

    ------------------------------
    Ryan Sheeler
    ------------------------------



  • 9.  RE: App Designer: add CUSTOMERNUM to Inventory Screen

    Posted 03-08-2022 12:28
    Here is the XML segment that I created - cloned it from the Previous segment.   It uploads just fine in to App Designer with no errors but the functionality doesn't quite work yet.  Below it is the Properties of the Textbook itself (this will be going in the Reorder Details tab of the INVENTORY app)

    <table id="companiescust" inputmode="readonly" selectmode="single">
    <tablebody displayrowsperpage="20" filterable="true" filterexpanded="true" id="companiescust_lookup_tablebody">
    <tablecol dataattribute="company" id="companiescust_lookup_tablebody_col_0" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
    <tablecol dataattribute="name" id="companiescust_lookup_tablebody_col_1" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
    <tablecol dataattribute="type" id="companiescust_lookup_tablebody_col_2" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
    <tablecol dataattribute="orgid" id="companiescust_lookup_tablebody_col_3" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
    <tablecol dataattribute="CUSTOMERNUM" id="companiescust_lookup_tablebody_col_4" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
    </tablebody>
    </table>



    ------------------------------
    Ryan Sheeler
    ------------------------------