Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

New field creation based on rules

Pranee_007
7 - Meteor

Hi team,

 

I am looking to add a new field based on the below conditions. Please help.

1. If the field 'Reference' is Check (case insensitive), a new column 'Code' should be added and assign a value Not-found to that.

2. If it sees the key word app in any case (case insensitive), I want the new field to be populated with the 9 digits after keyword app.

 

Example:

ReferenceCode
CheckNot-found
appv56789Supv56789Sup
APPf63889Dspf63889Dsp
aPpr67299Luyr67299Luy
checkNot-found
1 REPLY 1
LordNeilLord
15 - Aurora

Hey @Pranee_007 

 

A simple formula should suffice here:

 

If Contains([Reference], "app") Then Regex_Replace(Reference, "app", "") Else "not found" endif

Labels