Maximo Open Forum

 View Only
  • 1.  Defining a default on a sub-table through App Designer

    Posted 05-10-2024 11:33

    Defining a default on a sub-table through App Designer.

    In the application designer, I can't seem to get a default to work on a sub-table.  The specific example is on the task for a job plan we have a custom field called compliance and it should be based on a relationship to the job plan.  The problem is even hardcoding it to a specific value I can't get it to write a value to the JobTask record.  It just seems to ignore me and only work on the parent record.

    Does anyone have any insights into this?


    #EverythingMaximo

    ------------------------------
    Brad Delong
    WDW
    ------------------------------


  • 2.  RE: Defining a default on a sub-table through App Designer

    Posted 05-10-2024 16:26

    Can you clarify the exact requirement here? For example, is this field on job plan supposed to be copied down to the job task only once which is when the task is being created? Or if I modify the field on the job plan, should it roll down to each of the job tasks?

    And is this truly a default where we want the job plan value to cross over to the job task but the user can change it at the task level? Or is it always going to be the same as the job plan header?

    The reason I want to ask is if the use case does not involve the job task value being different than the job plan value, it's better to display it on the job task via a relationship rather than bring it down.



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



  • 3.  RE: Defining a default on a sub-table through App Designer

    Posted 05-12-2024 18:03

    Hi @Brad Delong!

    I do not understand well. Explain to me what the relationship is.

    If the COMPLIANCE field is in JOBTASK, you add your compliance field in the "job plan tasks" section/table and define a default value, it has to be taken. I have tried it and it works. The relationship does not matter, because that "Job Plan Tasks" section already has the JOBTASK relationship registered that allows data to be managed from JOBPLAN to JOBTASK. If it is data that is found in another table, explain to me what it is and what the origin and destination relationship is like.

    Regards!



    ------------------------------
    Martin Fabra
    ARSAT S.A. - Actively seeking employment
    ------------------------------



  • 4.  RE: Defining a default on a sub-table through App Designer

    Posted 05-13-2024 08:55

    Compliance on the Job Plan means something different than compliance on the Task.  Compliance on the Work Order can be inherited from the PM or Job Pan and governs how important and what rules apply to it.  Compliance on the Tasks (inherited from the Job Task) determine which steps MUST be completed and which you should but under certain circumstances don't have to do. 

    There is no one to one relationship between them and they are not just copied down.  For simplicity sake, let's say the Job Plan compliance of REGULATORY and SAFETY RELATED covert to a task compliance of COMPULSORY by default.  So all tasks should default to that and the person writing the job plan might clear that from a few of the tasks, but 85-90% should be COMPULSORY.  The conversion is done in a relationship but that is not the problem. 

    In my testing, I have hardcoded the default on the Job Task section of the JOBPLAN screen to a fixed value and it will not populate when you click New Task to write a new one.  This default is the issue, not what value it might be.  I can display it on the screen just fine but I need it written and saved into the JobTask table.



    ------------------------------
    Brad Delong
    WDW
    ------------------------------



  • 5.  RE: Defining a default on a sub-table through App Designer

    Posted 05-13-2024 10:05

    When I told you that I need to understand it, I was not referring to the explanation of what the COMPLIANCE field is for.

    Do you have a "COMPLIANCE" field in JOBTASK? Do you add it as a column in JOBPLAN in the "Tasks" section? Do you want to define a default value and you cannot define it? Tell me what you want to do so I can replicate it.

    Regards!



    ------------------------------
    Martin Fabra
    ARSAT S.A. - Actively seeking employment
    ------------------------------



  • 6.  RE: Defining a default on a sub-table through App Designer

    Posted 05-13-2024 12:09
    Edited by Brad Delong 05-13-2024 12:38

    Yes there is a compliance field on both the JobPlan and JobTask tables.

    I tell it in App Designer in the section for the relationship JOBTASK that I want a default value the same as I always have.  It ignores me when I click New Task and the compliance field is still null.

    The XML Looks like this:

    <table id="main_jpop_table" label="Job Plan Tasks" listeners="specification_jobtaskspectable" orderby="tasksequence,jptask" relationship="JOBTASK">
    <defaultvalue dataattribute="COMPLIANCE" defaulttype="insert" id="1712671190046" value="COMPULSORY"/>

    I am on 7.6.1.2 if that mattes.

    Update: I moved the default down further into the section and hardcoded it to a single value "COMPULSORY" and it works.  But that is just a simplification to see if I can get it to work.  When I restore it to the relationship that is needed it doesn't work.  The relationship is displayed on the screen right beside it so I know it is functioning properly.

    If you want to simulate my relationship in a simplified state make an alndomain and then a relationship off jobtask to the ALNDomain where domainID is whatever you named it.  Now try to load the value or description as the default.  For me it does nothing.  But I can show it on the screen just fine so I know it is working.



    ------------------------------
    Brad Delong
    WDW
    ------------------------------



  • 7.  RE: Defining a default on a sub-table through App Designer

    Posted 05-13-2024 14:14

    Have you tried doing it for another field? For example, there in the image I have defined a default value for the "DESCRIPTION" field (JOBTASK.DESCRIPTION). Before I had done it for the duration field (JOBTASK.TASKDURATION). It has always correctly taken the default value. In your case, don't you take it? Never or only as "compliance" field?



    ------------------------------
    Martin Fabra
    ARSAT S.A. - Actively seeking employment
    ------------------------------



  • 8.  RE: Defining a default on a sub-table through App Designer

    Posted 05-13-2024 14:22

    I defined a default for the Description for the same thing and nothing.  That is why I think it doesn't work on sub-tables.



    ------------------------------
    Brad Delong
    WDW
    ------------------------------



  • 9.  RE: Defining a default on a sub-table through App Designer

    Posted 05-13-2024 17:16

    How do you define a default value? In Application Designer, on the JOBPLAN application, do you add a "Default Value" control and define the field and the value? Is that not working for you? Try doing it in any other application. That should work. If it doesn't work, you have a strange problem... this is the first time I've seen it not work. What version do you have?



    ------------------------------
    Martin Fabra
    ARSAT S.A. - Actively seeking employment
    ------------------------------



  • 10.  RE: Defining a default on a sub-table through App Designer

    Posted 05-14-2024 09:04

    Yes, I know and have been doing it for 12 years or so.  Now try to define that as an attribute off a relationship from JobTask and tell me if it works for you.

    I am on 7.6.1.2.



    ------------------------------
    Brad Delong
    WDW
    ------------------------------