Hi
I have a requirement to rename the columns based on certain conditions using a Dynamic Rename tool
If ( left(Current field Name,2)="R_" then replace ("R_" with "ABC_" ),else Current field Name end if
Here i need to replace certain parts of the field name with another name (not the value in these fields)
Is there a way to do it
Thanks
Nidhin
Solved! Go to Solution.
Hello Nidhin,
Using Dynamic Rename Tool:
1) Rename Mode = "Formula"
2) Select all the fields to include
3) Example Expression below (I am sure there are different ways to write equivalent expression):
IF left([_CurrentField_],2) == "R_" THEN "ABC_" + right([_CurrentField_],length([_CurrentField_]) - 2)
ELSE [_CurrentField_]
ENDIF
Attached is also an Alteryx example. Hope this helps.
mDang
Hi @MDang
Thanks
I used the below formula to achieve this
if left([_CurrentField_],2)="R_" then replace ([_CurrentField_],left([_CurrentField_],2),"ABC_") else "XYZ_"+[_CurrentField_] endif
I had to add prefix for both sets of data after an in Db join and remove the R_ at the same time
Nidhin
User | Count |
---|---|
18 | |
17 | |
14 | |
6 | |
5 |