Want to get involved? We're always looking for ideas and content for Weekly Challenges.
solved using core tools
RegEx tool is so useful. Now I like Alteryx more than Python because of annotation for RegEx patterns.
1) We can use either "select" tool by converting string to numeric value
or we can use formulas TRIMLEFT([Field1],"0") which will remove all zeros from the beginning
2) Same here we can use select of formula tool. but the easy way is to go with select tool and convert string to double or float which I did here
3) Using formula tool will be ideal in this case.
if Right([ID], 2) = "ID" then left([ID],Length([ID])-Length(Right([ID], 2)))else [ID]endif
4) same here use formula tool
if Length([Safety Code]) > 8then Left([Safety Code], 8)elseif Length([Safety Code]) < 8then "SC" + [Safety Code]else [Safety Code]endif
Just learned about Regex on this one. I did not use it but it will be helpful in the future!
Here's my solution.
Thank you for another great opportunity!