Publié Tue, 09 Jul 2024 07:57:01 GMT par Sander Helfensteijn
I have a workflow where every invoice needs to be approved by the director if the invoice is more than € 2.000,-. 
This works fine but this also has to be on the negative side of the number. So credit nota's that are -€2.000,- 

Is this possible?
Publié Tue, 09 Jul 2024 08:15:54 GMT par Simon H. Hellmann Toshiba Tec Germany Imaging Systems GmbH IT-Consultant Document Management Solutions
Hello Sander Helfensteijn,

yes, you can just add multiple checks to the condition. For example (written from memory, not tested):
DW_AMOUNT > 2000 || DW_AMOUNT < -2000 this is C# syntax. Arithmetic expressions and Conditions can use a mix of C# and VBA, check out the "Workflow expression parser" document from the partner portal for more details.
In VBA Syntax you could do something like this: DW_AMOUNT > 2000 OR DW_AMOUNT < -2000

Greetings from Germany,
Simon H. Hellmann
DocuWare System Consultant
Publié Tue, 09 Jul 2024 08:18:20 GMT par Simon H. Hellmann Toshiba Tec Germany Imaging Systems GmbH IT-Consultant Document Management Solutions
Oh, another version which might work is using the C# function Math.Abs() - this returns the absolute value.

Math.Abs(DW_AMOUNT) > 2000

However, I am not 100% sure if this function is supported by arithmetic expressions.
 
Publié Tue, 09 Jul 2024 09:16:57 GMT par Sander Helfensteijn
Hi Simon, 

Math.abs works! 

Thanks.

You must be signed in to post in this forum.