okay. I believe there is an Item ABCD in your SITE field and you would want to rename it to AB. if is that what you are looking for then use below:
| inputlookup fo_all
| stats count by SITE
| fields SITE
| eval SITE=if(SITE=="ABCD","AB",SITE)
| inputlookup fo_all
| fields SITE # you are limiting fields to one field SITE, from here on you will have only one field.
| dedup SITE
| rename "ABCD" as "AB" # you are trying to rename field ABCD to AB which you don't have at this moment.
| table SITE
Rename is for field names. You have reduced your fields to just SITE. There is no field ABCD for you to rename as AB. What is it you are trying to do?
okay. I believe there is an Item ABCD in your SITE field and you would want to rename it to AB. if is that what you are looking for then use below:
| inputlookup fo_all
| stats count by SITE
| fields SITE
| eval SITE=if(SITE=="ABCD","AB",SITE)
thanks it works
Hi @jip31
What @thambisetty has suggested works fine for ABCD "renamed" to AB but I suspect this is just example data and what you want is something more generic, perhaps substr() or replace() might be more useful, you may want to consider using case() and match() to do different "renames"