Hi Team,
In the same column, i have two different sets of data,
Data as follows , 12 digit Alphanumeric and few of them 9 characters like mentioned below , i want to make new column by using formula that if field having 12 characters then RED , If field contain 9 character then Green.
Please help me out in this regards! - Thanks in advance.
Input | |
Column | |
040114AV2 | |
36209CVG8 | |
US36224NWQ23 | |
CA078149DW82 | |
Required Output | |
040114AV2 | GREEN |
36209CVG8 | GREEN |
US36224NWQ23 | RED |
CA078149DW82 | RED |
Hi @Jaganmohan
You can use formula like below
IF Length([Field1])=9 THEN "Green" ELSE "Red" ENDIF
Workflow:
Hope this helps : )
Hi @Jaganmohan ,
nice and simple. Just use a formula tool as follows:
if length([Input])=12 then "RED" else "GREEN" endif
Workflow attached,
I hope this helps.
M.
Hi @Jaganmohan.,
This could be achieved with the use of two column rules in a table tool:
I've attached my workflow for you to download if needed!
Kind regards,
Jonathan
Looks like I got the wrong end of the stick on this one! I went a little overboard 😂 Nice to show these things are possible I suppose!
@Jonathan-Sherman wrote:
Nice to show these things are possible I suppose!
I wouldn't disagree on that 😅
Thanks for the Quick response .. but in the same column i have blanks as well.
Hi @Jaganmohan,
That's because you'll have other lengths other than 9 and 12 in your column, you could add in an ELSE clause to capture and flag all other values?
if length([Input])=12 then "RED" elseif Length([input]) = 9 "GREEN" ELSE "OTHER" endif
Kind regards,
Jonathan