Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Trim and Delete Null rows with Dynamic Field Name

Harley
7 - Meteor

I am trying to build something simple in a macro - it takes multiple tables and for each table, apply a trim on all string fields and delete null rows. The idea is that it will loop through multiple tables and apply this cleanse then upload it to my SQL database.

 

The table will vary in the number of rows and the number of columns.

 

I can't seem to figure out how to get this done. To solve the first part, I tried to put in a Multi-Field Formula to check if it's a string first before applying the trim, but I am still getting an "Error: New Workflow2 (1): Record #4: Tool #14: Type mismatch. Number provided where a string is required."

 

11 REPLIES 11
Harley
7 - Meteor

Amazing, thank you so much !

 

The 2 solutions you provided works flawlessly!

 

I think I don't understand why for some tools the selected fields are not dynamic but some are and can be appropriately used in a macro. 

 

For example, the Data Cleanse tool was the one that I was initially going with, which is missing the 'Dynamic or Unknown Fields'. This I suspect is the reason why my initial attempt didn't work. 

Am I right about this? i.e. if I want to put a tool into a macro where the incoming fields are dynamic, I need to use tools that have 'Dynamic or Unknown Fields' in its input option.

 

Again, thank you so much for your help!

Harley

tfrendo
6 - Meteoroid

Many thanks for this solution to eliminate null rows for dynamic input files. Exactly what I was looking for as I have built a macro to dynamically upload excel files to iSeries and the iSeries doesn't appreciate null rows, so this solution is perfect for my case. Thanks again.

Labels