I am new to Alteryx and I am trying to create a formula which will provide me either the left most 4 or 6 characters of a string based on if they begin with 5050. If 5050 then return 6 all others will be 4.
16010500000000300 would return 1601
50506000010000001 would return 50506
I appreciate the help.
Thanks