This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I'm having a little bit of trouble regarding my workflow. My macro is not working properly..
- I need to add +1 on "field 3" as many times as the user decides. However, on the second image, you can see that the macro is running with an infinite number of times and its not adding "+1". How can I correct that?
For [Field_3], after the Iterative Macro produces the output as shown in @christine_assaad ’s solution, try using the “Formula” tool as the next step, and apply the following expression to update [Field_3]:
IF [Field_3] <= 9 THEN
“00000” + ToString([Field_3])
ELSEIF [Field_3] >=10 AND <99 THEN
“0000” + ToString([Field_3])
ELSEIF [Field_3] >=100 AND <999 THEN
“000” + ToString([Field_3])
ELSEIF [Field_3] >=1000 AND <9999 THEN
“00” + ToString([Field_3])
ELSEIF [Field_3] >=10000 AND <99999 THEN
“0” + ToString([Field_3])
As to why you are seeing the comma separators in Field_2, may I check that you are using version 2020.4? In this version release, there are 2 new settings that you can customize to change how numbers display in Designer: Thousand Separator and Decimal Symbol. These settings affect how numbers display on the Designer canvas, the Results window, and the Browse tool Data Profiling. The default settings depend on the language that you select for the Designer interface, but you can always update the defaults. Visit here for more details: https://help.alteryx.com/current/designer/user-settings#localization