Home › Discussions › Questions & Answers › Complex Parameter Validation Rules

Complex Parameter Validation Rules

Avatar photoCustomer Questions & Answers 7 replies

I have a complex report that requires either the ‘Supplier ID’ to be populated, OR both the ‘Supplier Name’ AND the ‘Supplier Site’ must be populated simultaneously. How do I write the advanced required parameter logical expression for this?

7 replies

  • Support Enginatics

    You can define this complex requirement by combining your conditions with `AND` and `OR` operators within the logical expression . Assuming your parameters are named ‘Supplier ID’, ‘Supplier Name’, and ‘Supplier Site’, your expression should look like this: `:Supplier_ID is not null or (:Supplier_Name is not null and :Supplier_Site is not null)` . The use of parentheses is important here to group the AND condition correctly .

  • When referencing parameters with spaces in their names within the logical expression, what is the exact naming convention I must follow?

  • Support Enginatics

    When referencing parameters in the advanced expression, you must use their name (in the base language, usually US) . This name must be prefixed with a colon (`:`) . Crucially, any spaces or other non-word characters within the parameter name must be replaced with a single underscore (`_`) . For instance, ‘Customer Name’ must be referenced as `:Customer_Name` .

  • If the expression fails validation, can I provide a custom error message instead of the default one?

  • Support Enginatics

    Yes, you can customize the error message . If you enter a specific message text when setting up the advanced required parameter, that text will be displayed if the logical expression is not met . If no specific message is provided, the system defaults to the FND message `XXEN_REPORT_INSUFFICIENT_PARAM` .

  • If I copy this report to create a new version, is the advanced required parameter logic preserved?

  • Support Enginatics

    When you copy a report using the ‘Copy Report’ function, the parameter definitions, including the advanced required parameter logic and the parameter SQL text, are copied to the new report . This ensures the stringent validation rules remain in place for the new version .

  • You must be logged in to reply to this post.