Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
aantunesp
Contributor
Contributor

Find a replace a string based on the value of another string

Hi,

 

I want to replace some field names based on the value of another field.

 

for example I have a list of users ids and I want to replace the user name by "internal" if the User type is = "Internal".

 

How can I achieve it?

 

Thanks in advance

Labels (1)
1 Solution

Accepted Solutions
Iswarya_
Creator
Creator

Hi @aantunesp ,

Try this:

If(UserType='Internal','Internal',Username) as Username

View solution in original post

2 Replies
Iswarya_
Creator
Creator

Hi @aantunesp ,

Try this:

If(UserType='Internal','Internal',Username) as Username

aantunesp
Contributor
Contributor
Author

Hi @Iswarya_ 

 

It works but I need to remove the as Username otherwise the syntax validation gives a error.

 

Many thanks !! 🙂