Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Control parameter changed string to number

WKiehn
7 - Meteor

In Germany the postcode has five digits, in some cases with leading zero.

In the control parameter I defined it as string(5) and join it with the macro input by postcode. Starting the macro I got an error: "String fields can only be joined to other string fields".

The postcode in the input is in both cases string(5) and I defined it in the macro as string(5), too. The marco input accept it, the control parameter interpret it as number.

 

I create a work around and defined the postcode in the parameter tool as number, add a select tool and change it to string(5). It works and I was suprise that I got the postcode back with leading zero. Is this a feature?

 

Please find in the attachment an example (workflow and macro)

2 REPLIES 2
michael_treadwell
ACE Emeritus
ACE Emeritus

This is a tricky one!

 

Inside of your macro, make sure that your Select tool connected to the Text Input is String: Forced instead of just String.

 

From the data type documentation page: "The data type drop-down list shows the incoming field type and a fieldtype: Forced option. By specifying the forced field type a macro author can ensure the incoming data type will always be the type they expect."

 

https://help.alteryx.com/10.6/Reference/DataFieldType.htm

WKiehn
7 - Meteor

Thanks for your support. It works with String: Forced.

Labels