Views:

Question:
How can I create a workflow that will remove the leading zeros from the numeric values of a given index field?

Answer:
The process of removing leading zeros within a workflow can be done with one Assign data step. 

1. First, we'll want to create a global variable that is an integer data type. In this example, we will name it ConvertToDouble.

2.  Assign data step, make the following assignments;

Workflow global variable = ConvertToDoubleArithmetic Expression of CDBL(Index_Field) 
Index data of the document = Numeric Index field you wish to use = 
Arithmetic Expression of CSTR(GV_ConvertToDouble) 

Index_Field - The field containing the values with the leading zeros.
CDBL - Method which converts the text string into the type Double. This is when the leading zeros are removed.
CSTR - Method which converts the type double value back into text.

3. When we run a document containing leading zeros through the workflow, we will see them removed. 

Please note that this only works for values that are numerals. This won't work if they contain any other characters.


KBA is applicable for both Cloud and On-premise Organizations.