We are in the final days to enter our Data and Analytics - "What's your why?" raffle with SparkED!

Reply with your "why" in text/video format to our forum post by January 28 to be entered! 

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Get a list of fields in a table

8 - Asteroid

I have a set of 32 tables I would like to apply the field info tool so I get a single list of fields

I started building a standard workflow until I saw this should be a batch macro - my first one


Below is the macro so far.   



It's pretty straightforward.  I pass in a list of tables and each time, replace the table name piece in the input tool (SELECT * FROM <table>).  The parse is used to remove everthing but the tablename in the source column


I configured the interface to autoconfigure by name but I am only getting the first field in the first table.  Also, I can't add a browse after calling the macro

Not sure what I'm missing but any wink,wink,nudge,nudge would be appreciated.  I would really like to shift into macros.   Thanks in advance.

ACE Emeritus
ACE Emeritus

So I was able to get this working.


First thing I would suggest is to use the query 'SELECT TOP 1 * FROM <table>' If you are only trying to get the field names.


Using my Input tool, I connected to a table in my database. Then, using the control parameter and action tool, I updated my connection string to replace the table name.




Then, like you, I used a field info tool and set the interface to 'Auto Configure By Name'


Then I save my batch macro and open up a new workflow.




Make sure to configure your macro by selecting the appropriate field for your control parameter

8 - Asteroid

Can you share the workflows?