LenaD184 Member since 2016 2 posts
Posted: 3 years ago
Last activity: 3 years 7 months ago

No Validation for Custom Filter Section in Report Definition


We are using a custom filter section in the context of a report definition rule. In this personalized section, we have two fields we wish to validate: “.StartDate” and “.EndDate”.

The “.StartDate” should not be more than 30 days before the current date and the “.EndDate” should not be more than 6 days after the current date.

In order to achieve this, we tried to test validation for one of the conditions (D+6) for this window, with the following approaches:

1. Simply add a “Change” event to the field, refresh the section all together and call an activity with a Page-Set-Messages step.

When we change the value, the message is correctly added to the associated 'Custom FIlter' clipboard page. However, upon submit, it ignores validation, no message is displayed and submission is allowed. Seems like the message has been copied (as expected, based on the pzValidateCustomFilterSection ) and is found on the next page, where the report results are displayed with the included custom filter section.

2. Adding an existing “Edit Input” rule to the property. For instance, “DateTime” :

Rule checks for Input format and blocks form submission. We get an alert sign next to the field and a pop-up message. One step closer but not exactly the condition we want to validate.

3. Adding our own personalized “Edit Input” rule to the property that checks if the value is before “Today + 6 days” and throws an InvalidValueException if not.

Nothing happens, no message, alert or blocking the submission.

4. Adding our own personalized “Validate Input” rule to the property that checks if the value is before “Today + 6 days”, throws an InvalidValueException if not and returns a Boolean.

The rule checks if the date is before Today+6, puts an alert sign + tooltip “PropertyValueInvalid” if not but doesn’t block the submission and we only get the message afterwards on the next page (report definition page).

Any idea(s) on how to work around this behavior and validate fields in this section ?

Thanks in advance.

Reporting User Interface
Moderation Team has archived post
Share this page LinkedIn