I've seen posts (like this one: https://community.alteryx.com/t5/Data-Preparation-Blending/Use-Special-character-in-Formula-tool/td-...) that suggest that in order to retain or export quotation marks as part of a text string, you precede them with a single quote. (So to get "AAA" you use '"AAA"' in your formula.) Only in my instance, I'm attempting to create dynamic content to be written to a batch file, and I need to parse a field name into the string. The juxtaposition of the field name within the quotes I'm commenting seem to be what's causing me problems. Has anyone done this before? What I'm attempting to write to the batch file is this:
move /y \\filepath\data\public\folder\Rebates_Processing\UploadClaims\*ABC*.xlsx "\\filepath\data\public\folder\Rebates_Processing\Folder1\[Passthru Value]\ARCHIVE"
The quotes are needed around the second path so as to handle instances where the passthru value has spaces in it.
The workflow successfully writes content to the batch file, but there seem to be extra quotes around some of the values which cause it to fail.
In my formula, I've used MANY iterations with slightly different quotes, but I'm thinking it should be something like this:
"move /y \\filepath\data\public\folder\Rebates_Processing\UploadClaims\*ABC*.xlsx '"\\filepath\data\public\folder\Rebates_Processing\Folder1\"+[Passthru Value]+"\ARCHIVE"'"
Has anyone successfully done this? I'd appreciate any feedback or suggestions! (This is such a complex workflow that to have it fail on something so small as a quotation mark is infuriating! :) )
Thanks...
Solved! Go to Solution.
Hello @ColleenH218,
Instead of trying to create a string, could we just have this string existing and do a find and replace? I have an example attached (which I apparently can't spell "Find")
Treyson
I tried the find/replace...I still ended up with more quotes than were needed. Off to try your second suggestion though!
@Treyson - I downloaded your sample and the difference between what you've suggested and what I previously tried seems to be feeding the string values through from an input source rather than from within a formula. (I'd previously tried the latter.)
Here's my configuration of my input:
And my formula piecing it together:
And what it produces in my .bat file, which still fails (error code 1):
It seems to want to wrap the entire thing into quotes, and double the quotes I intend to have in place.
I'm going to skip the insertion of quotes and get to the answer.
\0
When you are writing your .bat as a .csv file, Alteryx wants to put quotes around your string. If you change the delimiter to \0 (Null), it won't do that. I'm sorry to hear that you spent a long time on this. I don't know when or where I came across it in my past, but now the torch has been passed and you are the holder of this cup of knowledge.
Cheers,
Mark
@MarqueeCrew You're the master! Thank you SO MUCH!
This helped for me.. I am able to specify an output directory with spaces following this format:
'mkdir c:\folder\"folder with spaces"\' and then in the Run command opening up the Output settings for Write Source and entering \0 in the "delimeters" field, if that was unclear for anyone.
And thus the future of the Alteryx people was secured. From user to user the cup of knowledge was passed.
Thanks for this solution. I had been attemping various options, have been searching for this for a while, and have been growing increasingly frustrated by not being able to locate a solution. I should have realized. The character \0 is the ASCII character code for NULL. Thanks.