Hi Augustina,
Thanks for clarifying the exact action name. I think the issue is because you are using the action '
Get CSV Text As A Collection' from '
Utility - File Management' business object. This business object uses OLEDB operation in the back end to connect to your CSV file and treat it as a database. The issue here lies with the formatting of your file. Since, it is SQL based query if you do not internally cast the column at the point where you are firing the query the format changes won't appear. In your case, I guess that the code stage used in this action is treating your column as a 'Number' and that is the reason when you put a character such as 'R' it is not treated properly.
Replicating The Issue:I can show you a similar result I performed on a test CSV file and in my case also, 'R' won't be treated properly. The only difference is I am not getting 0 but null values instead.
As you can see, I have the below CSV file with me:
When I try to use a similar workflow as you have used this is the result I got:
Making changes to the underlying code in this object might be bit tricky as OLEDB queries in general have a very limited set of formatting available with them.
Solution:So instead, you can use a separate set of actions which I have used to get the same result as you expect:
So here I am using first the '
Read All Text From File' action in the
'Utility - File Management' VBO itself which will return me a text data item with the exact text content as shown below:
Once, you get this text data item, then simply use the 'Get CSV As Collection' action from 'Utility - Strings' business object where you can pass the text data item and store the result in a collection:
Conclusion:This approach won't ideally fail as when we use the '
Read All Text From File' action, we are using the
StreamReader class from
System.IO namespace that directly reads all your text content as bytes and by default applies the encoding of 'UTF-8' which will handle most of the character formats unlike the OLEDB approach where formatting can be a constraint. The only advantage that OLEDB approach which you are using right now has would be the speed of execution and handling of very large text files.
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future
Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website:
https://devneet.github.io/Email: devneetmohanty07@gmail.com
----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
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.