Do you use Alteryx in a language other than English? If so, we want to hear from you! Please help us improve the international experience of our products by participating in this 5 minute survey.

We are updating the requirements for Community registration. As of 7/21/21 all users will be required to register a phone number with their My Alteryx accounts. If you have already registered, you will be prompted on your next login to add your phone number.

Alteryx Designer Discussions

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

Gallery: String fields can only be joined to other string fields

russianVodka
5 - Atom

Greetings,

 

 

I've noticed that the gallery tends to skip some tools when jobs are run through there.

 

This error does not occur when running the job through designer.

 

Wondering if there is a way to get the same outcome when running it through gallery?

Screenshots of relevant tools attached

 

 

 

Thank you Team!

 

KR

3 REPLIES 3
CharlieS
17 - Castor
17 - Castor

Hi @russianVodka 

 

When you say "Skip some tools" you mean that you have a select tool before the Join that shows they're the correct type before the Join? If this is the case, it's not skipping the tool, but that Select tool isn't forcing the field types like you think. 

 

To ensure the field types of your join fields are the types you expect, there's a few things I'll recommend:

1. In the Select tool. If it auto-configures [Currency] to a V_WString, then you should be able to go into that Select tool and a new option will appear as "V_WString: Forced". Right now it's just displaying the types that were fed into it when you built it in designer, this new option appears after it's been run to force that type.

2. That option is pretty weak as far as forcing a field type goes. The better way is the Multi-Field Formula tool. This tool is extremely powerful not only because you can operate on multiply fields, but also because you can FORCE the type in the same tool. Configure the tool something like this to force string field type type of the same name and "value" as the current field. You'll need to use a second Multi-Field formula tool to force numeric types:

20210722-MultiFieldForce.JPG

3. Finally, this issue is ultimately coming up because the inputs changed types from what the workflow was built for. I'd also recommend avoiding this from the start by using Test tools  to throw an error if the inputs are not the correct field types for the workflow. Stop it before it starts with the added bonus that you can write your own custom error message that let's the user know what to do like "The Currency field is not a string. Update the input file and try again". 

Maskell_Rascal
12 - Quasar

Hi @russianVodka,

 

So what's happening here is that your are getting a type mismatch. When you upload a file into Alteryx, it automatically identifies the field type to the best of its ability. So if you have one file being uploaded where currency is recognized as a double, and then another where its recognized as a string, then these two fields cannot be joined together. 

 

The good news is that you can build your workflows, macros, and apps to hardcode the field type you want. It just takes a small little Select tool workaround. 

 

Step 1: Connect a Select Tool to your incoming data, and set the desired field type. 

Maskell_Rascal_0-1626963744627.png

 

Step 2: Connect a second Select tool to the first one, and use the drop down to select that field type as "Forced". 

Maskell_Rascal_1-1626963845467.png

 

Step 3: Right click on the first Select tool and choose the option Delete and Connect Around. 

Maskell_Rascal_2-1626964012360.png

 

Now your incoming data fields will be forced to their desired field types. 

Maskell_Rascal_3-1626964057028.png

 

The reason you have to connect two Select tools is because after Alteryx identifies the field type from the incoming data, it will only allow you to set that field type to "Forced" for the type it recognized. 

 

If this solves the problem please mark answer as correct, if not let me know!

 

Cheers!

Phil

russianVodka
5 - Atom

Thank you Comrades. Both answers are correct and fixed my issue, however the multi-field formula tip was a cherry on top, or should I say pickle to my vodka. Hahaha!

Labels