Announcement

Collapse
No announcement yet.

IF condition based on enum field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • IF condition based on enum field

    Hello,

    I have an enum field which represents the types of numerical values we have in an entity within the screenshot attached.

    Some of these values must be negative, and some of these values must be positive (i.e. a discount type must have an associated negative value whereas a contract type must have an associated positive value).

    How can I create a workflow (or something else) to ensure that these types have the correct positive or negative value associated? For example, IF the value type is a discount, THEN the value must be negative in order to be able to save.

    Thank you in advance!

    Camille

  • #2
    Hello,

    I think it is possible to do it.
    For this, you will need to enter two new variables in the condition (positive value and negative value).
    The formula itself with the `IF`condition, must be a set of all data that you want to change and assigned them new values.

    This article can help you:

    Comment


    • #3
      Thank you DEN

      I will use the absolute value for positive numbers, but do you know what the function is to return a negative value when entered? I.e. if $300 is entered, turn it into $-300.

      Comment

      Working...
      X