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)
Solved! Go to Solution.
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."
Thanks for your support. It works with String: Forced.