Alteryx Designer Desktop Discussions

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

Getting Type Mismatch Error, which is incorrect

MOCSX004
5 - Atom

I just upgraded to Alteryx Designer 10.6.  I am trying to use the "TrimLeft" function, and I am getting an error that does not make sense: 

 

  • Using the Select feature, all of my fields have been set to “String”.
  • I then set up the “TrimLeft” String Function in the Formula tool to reference one of those string fields.
  • The Output Field Type is also set to “String”.
  • The error message I am receiving says “Type mismatch. Number provided where a string is required”.
  • This not not correct, and I have tried several times to get this to work, and I have never had any issues like this with my previous version of Designer.

Can anyone provide me with some direction as to why this might be happening?

Parse Error_String Mismatch.jpg

 

Thank you

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus
TrimLeft([Grouping],"10")

The trimmed text was a number.....

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
RodL
Alteryx Alumni (Retired)

The TrimLeft() function requires two strings as parameters. In your example, you have the value "10" without quotes, so I am thinking that is where the mismatch is.

Are you really just wanting the left 10 characters? Then just using Left() would work there.

MOCSX004
5 - Atom

Thank you.  It looks like "Left" is the function I need, not "Trim Left".  I appreciate your help!

MarqueeCrew
20 - Arcturus
20 - Arcturus

That's funny.  I took you literally thinking that numbers like 101234567890 needed to become 1234567890.  It didn't occur to me that left(field,10) or 1012345678 is what you wanted.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels