Glad
@LorenzoCapocci1 that your issue got resolved. However, what I meant was actually checking the data type of the data item where you were storing the value not the collection that was in the screenshot. Even though the '
Value Read' data item has been set up as the action stage's output, still there is a possibility can be a '
Number' data type if you have created it manually rather than the eraser button. I was telling this since I actually was able to replicate your issue at my machine when I set the Value Read data type as '
Number', hence that was my fair guess.
However, if all the data items are of '
Text' type then it should not happen ideally because at my machine also I am getting proper value with the leading zeros using the same action.
One thing I see that may pose a problem to your solution is if tomorrow let say your length changes or becomes dynamic. Better way in this case would be to first check if you have leading zeros or not using a Regular Expression like: "
0+\d*
" in the '
Test Regex Match' action. If you get a True value from this action, then get the number of zeros from the expression and then concatenate those many zeros at once. To get the number of zeros, you can use '
Extract Regex Values' action with the regular expression as:
(?<NumberOfZeros>0+)\d*
. Also, have a collection with columns as '
Name' and '
Value' and provide the value of first row for 'Name' as
"NumberOfZeros". Once you execute the action, the 'Value' column will have all the leading zero's which you can the concatenate with the target string as per your logic.
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.