Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Manipulate User Inputted String with Single Quotes

AW25
7 - Meteor

Hello,

 

I'm trying to build part of a workflow where a user input updates a SQL query. I basically want to allow users to enter a string of GL Account Numbers like:  10001,10002,10003  and have Alteryx convert it to  '10001','10002','10003'  at which point I can use the Dynamic Input to update the Where clause with this string. But I'm actually struggling to just get the quotes around the account numbers (which you would think would be the easiest part). The attached workflow is dropping the end of the string like in the picture below. Could someone please tell me what I'm doing wrong?

 

sample_1.jpg

 

Thank you!

2 REPLIES 2
estherb47
15 - Aurora
15 - Aurora

Hi @AW25,

 

Not sure what your process is so far, but I took the string of numbers, parsed into rows on the comma, added the single quotes with a formula tool ("'"+[Field]+"'"), and then concatenated back to a single field with the Summarize tool. Take a look and see if this works for you

 

image.png

danilang
19 - Altair
19 - Altair

Hi @AW25

 

From the image you attached it looks like your workflow is truncating the string somewhere.  This is probably caused by the field GLAAccounts and GLAAccounts2 being defined as string(17).  "10001,10002,10003" has 17 chars.  Adding quotes into the middle of the string makes it longer which will cause Alteryx to silently drop the trailing characters that end up outside the bounds.  Put a Select tool early in your workflow to increase the length of these fields to 30, which will allow you to add leading and trailing quotes to each account number.  

 

Dan

Labels