- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- Report plugin - Input filter transformations
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 11:03 AM
06-27-2023 11:03 AM
Report plugin - Input filter transformations
Working on a custom report for a customer, I needed to add two OptionTypes in the plugin provider to capture some data to be used in the report filter (start and end date). They were text fields. I expected that users would key in full dates in both fields i.e no helpers/pickers.
I set values of startDate and endDate in the fieldName property and compiled and uploaded the report while testing.
I was surprised that in the report filter modal, a date in US format was presented in both fields and further, that clicking presented a date picker.
It occurred to me that the Morpheus UI is transforming my fields via CSS/JavaScript based on my naming.
By changing only the fieldName properties to startMonth and endMonth, the UI then presented a monthPicker .
This is the configuration of one of the OptionTypes in the report provider (which presents a month picker):
// end date
OptionType endDate = new OptionType(
code: 'end-date',
name: 'EndDate',
fieldName: 'endMonth',
fieldContext: 'config',
fieldLabel: 'End date',
displayOrder: 1,
inputType: OptionType.InputType.TEXT
)
Note there is nothing in the inputType property which would suggest it would present as anything other than a HTML text input.
Tagged as experimental, but I thought was really cool and worth sharing. I don’t know yet how any transformations in the UI will be presented and so parsed in the report provider I’m working on, or whether there is chance of collisions given the control naming.
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Tags:
- experimental
- reports