Home Discussions Questions & Answers Complex Parameter Validation Rules

Complex Parameter Validation Rules

Avatar photoCustomer November 26, 2022 at 12:27 am

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?

Viewing 6 reply threads
  • Author
    Replies
    • Support November 26, 2022 at 11:38 am  

      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 .

    • Avatar photoCustomer November 27, 2022 at 3:19 am  

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

    • Support November 28, 2022 at 10:22 pm  

      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` .

    • Avatar photoCustomer November 30, 2022 at 5:24 am  

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

    • Support December 2, 2022 at 6:25 am  

      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` .

    • Avatar photoCustomer December 3, 2022 at 4:01 am  

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

    • Support December 5, 2022 at 12:39 am  

      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 .

Viewing 6 reply threads
  • You must be logged in to reply to this post.

Login with: