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.)
Warning No formatter is installed for the format ipb0 -
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.
Warning No formatter is installed for the format ipb0 -
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.
0
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 105 General Questions
- 141 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management