If you need to define the variable error message, you can embed expressions directly in the Error Message value box by using curly brackets - {}. Everything between them is treated as an expression and evaluated for each validation result. Expressions are treated as OCL2.0 expressions by default, but you can also use binary expressions: {bin: <binary expression>}. For example, in the following error message the budget is calculated according to variables. The result of the expression is provided as number in the Validation Results panel, e.g. Budget not balanced - overbudget by $500. Budget not balanced - overbudget by {
ResearchProject::allInstances().budget->sum() -
Sponsor::allInstances().contribution->sum()}$ |
You can insert a hyperlink. Learn more about defining hyperlinks >> |