Thanks to all who attended today's OpenText Support Community Event: Customer Contributions to Knowledge Program.

A recording of the event and the next steps to start your contributions can be found here:

Customer Contributions to Knowledge Presentation

Let's get started!

How to make input parameter required based on user's input in maximo?

Hi All,
I have a following requirement for my BIRT report. My report have two input parameters named ASSET and LOCATION, user needs to be entered either one of these input parameter. When he leave blank both input parameters, I need to display a message to enter at least one of the input parameter either ASSET or LOCATION in maximo.

How to do we do it ? Please help me.

Thank you!!

Regards,
Siva Gv.

Answers

  • In the second parameter's Validate event handler, add code that returns false if both values are missing:

    params{"ASSET"].value == null && params{"LOCATION"].value == null ? false : true

    (This code is untested and is meant only as an example.)

    Jeff F.

     

    Customer Support Engineer I

    Website: www.opentext.com

     

    emailsupport-logo-opentext.gif

     

     

     

  • Hello Jeff,
    Thank you so much for the reply.
    If you can provide a sample report, that will be more helpful for me.

    Regards,
    Siva Gv.

  • edited July 2

    Hi Siva,

    The sample code I posted has a typo ("{"). It won't run. It also doesn't check the parameter values for an empty string which it should. I'm sorry that I wasn't more careful when posting the code. I did additional testing and found that although adding code to the Validate event will display a generic error indicating to the user that there was an issue with the parameter values, it isn't a great solution in terms of explaining and instructing the user. I created what I think is a better solution that does not use the Validate event (see attachment).

    A Grid element was added to the report layout containing instructions for the user. It has a visibility rule so that the Grid is only displayed when no parameter values are entered. To see the Grid's visibility expression, select the Grid element and click the Visibility property. Click the Expression Editor icon (fx) to see the full expression. The report content was placed in a second Grid element that has the opposite visibility rule. So if the user doesn't enter a parameter value they see a message telling them to run the report again and enter one, otherwise they see the report content.

    The attached example can be modified to fit your requirements and the code should be tested.

    Jeff F.

     

    Customer Support Engineer I

    Website: www.opentext.com

     

    emailsupport-logo-opentext.gif

     

     

     

  • wwilliamswwilliams Junior Member

    I don't know if you can still do it, but you used to be able to delete the parameters after importing the report into Maximo. Then when the report was run, it would popup the same parameter dialog you get in eclipse. So import, then delete the Maximo parameters, then generate the XML. (make sure you have one required parameter) I just tried it on our 7.5 and it still worked.

Sign In or Register to comment.