Maximo

Maximo

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

 View Only
  • 1.  I need to find form-execution property in the app.xml (Inspection application)

    Posted Fri January 17, 2025 01:33 PM

    Hello,

    I need help with my Inspection application. I got advice for my problem with choiceDisplayThreshold. There should be form-execution control in app.xml, where I can set choice-display-threshold attribute, but I just can't find it. I need to adjust this attribute through AppCustomizations.js, because I can't rewrite it in FormExecusion.js react attribute directly. I will appreciate every advice possible. 



    ------------------------------
    Vojtěch Šustek
    ------------------------------


  • 2.  RE: I need to find form-execution property in the app.xml (Inspection application)

    Posted Fri January 17, 2025 02:38 PM

    Hi Vojtěch Šustek

    As @Steven Shull wrote in this post you should be able to add this property choice-display-threshold into form-execution tag. Please open app.xml file and find section form-execution, there add mentioned property. It should look like this:

    <form-execution form="{app.state.form}" choice-display-threshold="30" 
    conditions="{app.state.formConditions}" questions="{app.state.formQuestions}" 
    loading="{app.state.loadingForm}" update-dialog="updateDialog" 
    datasource="executeInspections" id="vrw4n" on-change="computeFieldChanges" 
    show-info="openInformation" open-previous-results-drawer="openPreviousResultsDrawer" 
    meters="{page.state.metersList}" on-load="checkFormLoaded" edit-trans="{page.state.editTrans}" />

    You can also find more information about available properties in this file: INSPECTION/ext/registry/form-execution.js



    ------------------------------
    Bartosz Marchewka
    IBM Maximo Consultant
    AFRY
    ------------------------------



  • 3.  RE: I need to find form-execution property in the app.xml (Inspection application)

    Posted Fri January 17, 2025 03:32 PM

    Hi Bartosz Marchewka

    thank you so much! Yeah, advice from Steven Shull was really great and I'm glad for his help, same as yours. When I was trying to set that attribute in this snippet of code, I had problems with loading Inspection page afterwards. I will try your solution and make it work for me. Thank you very much once more! 



    ------------------------------
    Vojtěch Šustek
    ------------------------------



  • 4.  RE: I need to find form-execution property in the app.xml (Inspection application)

    Posted Fri January 17, 2025 04:08 PM

    Only thing I need to do is adjust it through AppCustomizations.js, thats my assignment. So I need to set up it correctly. 



    ------------------------------
    Vojtěch Šustek
    ------------------------------



  • 5.  RE: I need to find form-execution property in the app.xml (Inspection application)

    Posted Tue January 21, 2025 08:29 AM

    I would speak to whomever gave you the assignment. They probably wanted you to avoid customizing the out of the box JavaScript which is wise. Customers that modify these files are required to manually reapply their changes on every release. And these customizations are not supported. 

    App.xml & AppCustomizations.js are both intended for customer configurations. When something is possible in the app.xml, like this setting is, you should use it there. Think of it almost like Application Designer=app.xml and Automation Scripts=AppCustomizations.js. You don't write an automation script when something can be achieved with out of the box configuration.

    Unless there's more to the requirement that isn't clear here, I would definitely do this in the app.xml



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