Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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 !! 🙂