Tried using replace, as well as regex replace. but the string with have blackslashes. The backslashes couldnt be replaced or removed… How do i solve this?
e.g. First,Second,Third
to
“First”,“Second”,“Third”
I added the quotes for the string, but final output has backslashes like "\"First\",\"Second\",\"Third"
@TyraS I would do it by splitting the string into an array, surrounding each string in the array with quotes, then joining the array back into a single string with a comma delimiter. See the attached workflow as an example:
Hi @Pratik_Wavhal@Dave , It doesnt show the backslahes on the message box, but shows on the debugging panel. Hence when i insert the output string into another string, it doesnt work
Yes those. Im not sure if its because of that that the below code does not work. But it works if i hardcode the string.
Dont work: dtTable.DefaultView.ToTable(False,str).Clone
A backslash is never used at any point in the code. Try using a write text activity and saving it to a .txt file. Does it still have backslashes? It may just be a visual issue when you’re looking at it in debug mode
@TyraS Since the value is a String, and since you want to Represent each value separated by comma as a Separate value, I guess the Best method would be to use Split()
str = “First,Second,Third”
strArray = Split(str,“,”)
where strArray should be of the type Array of String
Then you can use it in the Expression as below :
dtTable.DefaultView.ToTable(False,strArray).Clone