Veröffentlicht Fri, 11 Mar 2022 16:00:09 GMT von Stephan Browning Consultant Sytèmes
Hello

I have a value in an array (123456 - VAT rate), I would like to remove everything before the dash and keep only the "VAT rate", with what arithmetic expression could I do this. thank you
Veröffentlicht Mon, 14 Mar 2022 09:03:50 GMT von Fabian Kall

Trim(Split(<your_variable>), "-")[1]) should work.

Veröffentlicht Mon, 14 Mar 2022 09:27:14 GMT von Stephan Browning Consultant Sytèmes
Hello

I did the test, Trim(Split(GV_Profil___TVA),"-")[1]), but I got an error
" no applicable method split exists in type strings"
Veröffentlicht Mon, 14 Mar 2022 09:52:26 GMT von Simon H. Hellmann Toshiba Tec Germany Imaging Systems GmbH IT-Consultant Document Management Solutions
Hi Stephan,&nbsp;<br> <br> Notice the plural in the error message: that error happens because Split() and Trim() as well only work on string variables, not on an array of strings.<br> You first need to retrieve the single string from the array and then use Split(). One option for this might be KeywordAsString().<br> <br> Also, Split()[1] returns the second element, so in your example " VAT rate". What you want to use is Split()[0] to get the first element, in your example "123456 ".<br> <br> Somewhere in the KB there is a PDF Document "Arithmetic Expressions - Workflow Expression Parser" which lists all available functions for arithmetic expressions, maybe that could help you find a good solution.&nbsp;<br> <br> Greetings from Germany,<br> Simon H. Hellmann<br> DocuWare System Consultant

Sie müssen angemeldet sein um Beiträge in den Foren zu erstellen.