Home Discussions Questions & Answers Enforcing Either/Or Parameter Entry Using Logical Expressions

Enforcing Either/Or Parameter Entry Using Logical Expressions

Avatar photoCustomer March 20, 2022 at 1:17 pm

I need to ensure that the user provides at least one of two parameters (‘Customer Name’ or ‘Account Number’) to prevent running a query with insufficient restrictions. The simple ‘Required’ flag won’t work.

Viewing 4 reply threads
  • Author
    Replies
    • Support March 20, 2022 at 11:01 pm  

      You need to use the Advanced Required Parameters feature, which accepts a logical expression to define complex validation logic.

    • Avatar photoCustomer March 22, 2022 at 11:35 am  

      What is the correct logical expression syntax for ‘either/or’ logic, assuming those parameter names?

    • Support March 24, 2022 at 8:19 am  

      You reference parameters by their name (in US language), prefixed with a colon, and with spaces replaced by underscores. The expression would be: :Customer_Name is not null or :Account_Number is not null.

    • Avatar photoCustomer March 25, 2022 at 8:04 am  

      If the expression fails at runtime, where is the default error message defined?

    • Support March 26, 2022 at 9:08 am  

      The default message displayed is stored in FND message XXEN_REPORT_ONE_PARAM_REQUIRED (for expressions enforcing at least one entry), or XXEN_REPORT_INSUFFICIENT_PARAM for general insufficient restriction errors. You can also specify a custom message text.

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

Login with: