community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
Alteryx Gallery is experiencing a problem in which system emails are not being sent out. As a result, if you are attempting to sign up for a new account, you may be unable to verify your email address. We are working to solve this as soon as possible and will remove this notice once resolved.
SOLVED

Dynamic Field type

Asteroid

Hi

 

Is there a way to set all the fields as V_String ?

I will be using this in a batch Macro and the field names will change for each data set.

I know doing this will cause Alteryx to allocate more memory,but i am working on  data comparison workflow and will need to compare the field.

When Alteryx is setting the field type automatically, field type is having mismatch causing the formula tool to through error.

 

Eg: In data set 1 Field "ABC" might be set as V_String,but in data set 2 Field "ABC" is being set as Double as the entire column is empty.I want both these fields to be set as V-String.and in each run this can change.So i want a dynamic option. Basically to set all the fields being passed to the Macro as V_string

 

Thanks

Nidhin

Alteryx Certified Partner
Alteryx Certified Partner
Hi!

Strangely enough this is something you can do easily with the multi-field formula tool.

Choose 'all types of' in the menu and check every field including the dybamic/unknown fields option.

Uncheck the option which says rename and add prefix.

Check the option to change the date type and set it to v_string.

Set the formula statement to be [_currentfield_].

Alternatively, you could wrap any values you use in your formula in a tostring() which then means, If the field comes through as a text or double, it will always be treated as a string within that specific formula.

Ben
Highlighted

You can use a Multi-Field tool to amend the type of all columns to be string:

2019-01-28_07-40-45.jpg

By default the tool will create NEW_ columns so make sure you untick that.

 

The expression 

ToString([_CurrentField_])

 

Will convert all types to string. 

 

Tiny sample attached

Asteroid

Thanks you both. Didn't knew it was this easy to do.

Labels