Maximo

Maximo

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

 View Only
  • 1.  Lookup return attributes

    Posted 11/04/21 02:53 PM
    Hi,

    I have a question regarding lookups. When creating a custom lookup, we have the following line :
    <returnAttribute id="abc" sourceAttribute="" targetAttribute="">

    the sourceAttribute is the one define in the lookup (for exemple "location")
    the targetAttribute is the name of the attribute that will use the lookup.

    Here's my problem. On the workorder I added 3 attributes let's call them att1,att2 and att3.
    Those 3 attributes are filled with "PERSONID" from the table "PERSON"
    What should I write in the targetAttribute in this case ? 
    What should I write in the lookupAttribute in the UI View ?

    Thank you

    ------------------------------
    Mathieu Guilmette
    ------------------------------



    #AssetandFacilitiesManagement
    #MaximoAnywhere
    #Maximo


  • 2.  RE: Lookup return attributes

    Posted 11/05/21 07:44 AM
    Hi Mathieu

    This is just like the crossover domain where the source is the attribute that has the data you want and the target is the attribute where you want to out the data.

    This code snippet shows the ability to return more than one attribute when you use a lookup.

    <returnAttributes id="Inventory.ItemsLookup_returnAttributes">
    		<returnAttribute id="Inventory.ItemsLookup_itemnum_itemnum" sourceAttribute="itemnum" targetAttribute="itemnum"/>
    		<returnAttribute id="Inventory.ItemsLookup_location_location" sourceAttribute="location" targetAttribute="location"/>
    		<returnAttribute id="Inventory.ItemsLookup_binnum_binnum" sourceAttribute="binnum" targetAttribute="binnum"/>
    		<returnAttribute id="Inventory.ItemsLookup_lotnum_lotnum" sourceAttribute="lotnum" targetAttribute="lotnum"/>								
    </returnAttributes>​

    This example is based on your question, but I'm sure you really didn't mean to do this from a single lookup
    <returnAttributes id="1returnAttributes">
    	<returnAttribute id="1_attr1" sourceAttribute="personid" targetAttribute="attr1"/>
    	<returnAttribute id="1_attr2" sourceAttribute="personid" targetAttribute="attr2"/>
    	<returnAttribute id="1_attr3" sourceAttribute="personid" targetAttribute="attr3"/>
    </returnAttributes>



    ------------------------------
    ===============================
    Craig Kokay,
    Lead Senior Maximo/IoT Consultant
    ISW
    Sydney, NSW, Australia
    Ph: 0411-682-040
    =================================
    #IBMChampion2021
    ------------------------------



  • 3.  RE: Lookup return attributes

    Posted 11/05/21 08:19 AM
    Hi,

    Exactly, I don't want to do this from a single lookup.

    There are 3 textbox in the screen and each of them has the same domain (PERSON). I want to reuse the same lookup.

    So I have to duplicate this lookup to have 3 identical except the targetattribute ? Isn't it a little bit counter intuitive ?

    Thank you

    ------------------------------
    Mathieu Guilmette
    ------------------------------



  • 4.  RE: Lookup return attributes

    Posted 11/05/21 08:56 AM
    Hi Mathieu,

    I had some suspicion that you wanted to reuse the same lookup.  You don't have to use the returnAttribute. 
    lookup="personsLookup" lookupAttribute​="personid" resourceAttribute="attr1"

    This should work.


    ------------------------------
    ===============================
    Craig Kokay,
    Lead Senior Maximo/IoT Consultant
    ISW
    Sydney, NSW, Australia
    Ph: 0411-682-040
    =================================
    #IBMChampion2021
    ------------------------------



  • 5.  RE: Lookup return attributes

    Posted 11/05/21 09:09 AM
    It actually works ! It's a good thing to know that the returnAttributes of the lookup section is optional. I will know it for the next times.

    thank you for the fast reply and the resolution of my issue.


    ------------------------------
    Mathieu Guilmette
    ------------------------------



  • 6.  RE: Lookup return attributes

    Posted 11/05/21 09:26 AM
    Hi Mathieu

    That's good to know it works.

    ------------------------------
    ===============================
    Craig Kokay,
    Lead Senior Maximo/IoT Consultant
    ISW
    Sydney, NSW, Australia
    Ph: 0411-682-040
    =================================
    #IBMChampion2021
    ------------------------------