Skip to Content

dynamic constraints with and / or

use case: VariantProduct or BaseProduct should have a description.

I tried it with dynamic constraint in several ways:

 V1: return getDescription() != null || getBaseProduct().getDescription() != null
 V2: return (getDescription()!=null && getDescription().length()>1) ||  (getBaseProduct().getDescription() != null && getBaseProduct().getDescription().length()>1)

Any idea? Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Dec 18, 2017 at 01:26 PM

    ,

    Description is a localized attribute, so I'm not sure if your use case description is complete. Please consider updating it.

    Cheers, Jacek

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 21, 2017 at 10:42 AM

    In the mean while I found out the source of my trouble:

    Obviously only the first error-prone dynamic constraint will be displayed. Result of following dynamic constraints do not appear.

    Searching for "constraints" got this: https://answers.sap.com/questions/12753552/view.html

    Is there a better solution?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.