0
IF(UnitPrice != UnitPrice + 50, UnitPrice + UnitPrice, null)

Error: Formula result is data type (Number), incompatible with expected data type (true or false).

2
  • 3
    A validation rule can only throw an error based on whether the rule evaluates to true or false. It can't update field values. You should look into using a field update and workflow rule.
    – martin
    Commented May 9, 2017 at 6:10
  • This condition UnitPrice != UnitPrice + 50 is always true; Why you added this? You can directly add code like UnitPrice + UnitPrice right? Commented May 9, 2017 at 6:42

2 Answers 2

1

By Using Validation Rule you can't achive so, go with an workflow field update in select criteria as of your requirement and in field update select 'Use a formula to set the new value' give value UnitPrice + 50

0

the purpose of a validation rule is to put in restrictions to ensure data sanity. If you want to automate the process (which seems to be the case here), you should consider check Workflow or Process builder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .