1

n work order tracking application on Vendor field we need to have a custom look up that would display vendor details based on some condition. I have created a custom dialog in order to display this custom look up. This custom dialog maps to a relationship between WORKORDER and CXDEMO object (CXDEMO holds the data based on custom condition). Now when user clicks on the navigation menu on WORKORDER.VENDOR field then the custom look up appears and the data also gets displayed in the dialog however after selecting the value it does not get persisted to the WORKORDER.VENDOR field. I do understand that this can be achieved using bean class however I would like to understand whether there is any other way to achieve the same. Below is the dialog,

<dialog id="CXDEMO" label="Frame agreement vendors" relationship='CXDEMO'>
 <table id="CXDEMO_1" label="Vendors" inputmode="readonly" selectmode="single">
 <tablebody displayrowsperpage="6" filterable="true" filterexpanded="true" id="CXDEMO_grid1_1_1_pmalert_table_tablebody">
 <tablecol dataattribute="vendor" id="CXDEMO_grid1_1_1_pmalert_table_tablebody_2" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
 </tablebody>
 </table>
 <buttongroup id="CXDEMO_2">
 <pushbutton default="true" id="CXDEMO_2_2" label="Cancel" mxevent="dialogcancel"/>
 </buttongroup>
 </dialog>

dialog

max092012
  • 365
  • 1
  • 5
  • 25
  • Does your CXDEMO actually contain the vendor records, or can it be used as a passthrough/join in a relationship to the COMPANY table? If your dialog is displaying rows from the COMPANY table, you might not need much customization to make it work, but I'm not expecting much. What you will likely need to do is add a MAXLOOKUPMAP entry for this, which can be done from the database configuration application. When I get back in front of a Maximo environment again, I'll try to get more specific information for you. – Dex Nov 28 '19 at 01:01
  • This IBM page talks about how to let Maximo know what value is supposed to be returned where from a lookup. This, combined with the bean class JPTremblay points out, is likely the source of your trouble. https://www.ibm.com/support/pages/associating-lookups-maximo-using-maxlookupmap-table – Dex Dec 04 '19 at 15:54

1 Answers1

0

You need to specify a bean class to manage your dialog but I don't think you need to create a new one. You should only change your definition to use the lookup bean.

Like this:

<dialog id="CXDEMO" label="Frame agreement vendors" relationship='CXDEMO' beanclass="psdi.webclient.system.beans.LookupBean">

By referencing this bean you tell Maximo what class to use for the important selectrecord event/method.

JPTremblay
  • 900
  • 5
  • 8
  • I tried this however it does not work. The dialog does not get closed at all. I also tried lookupbean but no luck. – max092012 Nov 27 '19 at 17:11
  • Any reason to use a dialog definition instead of adding a new lookup definition in the LOOKUPS.xml file? – JPTremblay Nov 27 '19 at 17:21
  • 1
    You probably only need to convert your dialog to a simple lookup with a "relationship " parameter and refer to that lookup name from your Vendor field in your Work Order tracking app. – JPTremblay Nov 27 '19 at 17:29
  • This field should have 2 select values 1 oob and the other customized to the lookup. Hence i cannot go for a lookup as oob functionality might not work – max092012 Nov 27 '19 at 17:36
  • Interesting... I guess you could determine the lookup with some condition such as in this example: https://www.ibm.com/support/pages/conditional-lookup-functionality – JPTremblay Nov 27 '19 at 17:50
  • You can add a custom appmenu entry (I forget how right now) that has the out of the box lookup as one entry and your custom lookup as the second entry. Then when they select your custom lookup, it uses what you configure in the LOOKUPS.xml for the table. – Dex Nov 28 '19 at 01:00
  • Yes i have a custom menu in menus.xml one points to oob and the other to this dialog. I cannot point the other to a custom lookup as nothing happens the values are not displayed at all. Hence created a dialog which does brings data but does get persisted. – max092012 Nov 28 '19 at 01:08
  • But the lookup opens properly to a table with your fields listed and without invalid bindings (but no records/rows in the table)? – Dex Nov 28 '19 at 04:00
  • @Dex No data is present in the dialog, in my screenshot you can see DEMO is the Vendor that appears however after I click on DEMO the dialog gets closed but DEMO is not getting saved in VENDOR field. The VENDOR field remains blank. – max092012 Nov 28 '19 at 04:33
  • Do you get data or not in your dialog? If you get data you're on the right track. If the value isn't copied from the dialog to the field, that means that the "selectrecord" method isn't doing what it should. I suggested to use the base DataBean but I think it should be the LookupBean instead. Changed my answer. Also, as Dex pointed out, you'll probably need to add an entry into MAXLOOKUPMAP. See this for details: https://www.ibm.com/support/pages/associating-lookups-maximo-using-maxlookupmap-table – JPTremblay Nov 28 '19 at 14:41
  • @JPTremblay No even this doesn't work. There is no error however the set value on the vendor field does not happen. – max092012 Dec 03 '19 at 13:14
  • Nothing in the system logs? Please edit your question to make it clearer. Add relevant information (snippets, screenshots). Describe the requirements, i.e. what functionality is needed, instead of what you have done. – JPTremblay Dec 03 '19 at 21:01