Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
twanqlik
New Contributor III

Search string based on a character and remove or scramble

In my dashboard i'm loading a field that can contain email addresses, i would like to remove or scramble these email addresses.

Example:

Field
info@test.nl
New York
Belgium
Honda
Qlikview

Desired output:

Field
NULL or wlegh#)*%_
New York
Belgium
Honda
Qlikview

Hence, in my script i think i first need to search on values in my Field that can contain an @, and after that remove it, or scramble it.

Any ideas on how to do this?

1 Solution

Accepted Solutions

Re: Search string based on a character and remove or scramble

I think it should be more like this (you missed an asterisk at the end of the string)

If(WildMatch(field, '*@*'), AutoNumber(field), field) as field

you can make it more precise by adding the .* also.

If(WildMatch(field, '*@*.*'), AutoNumber(field), field) as field

3 Replies
ali_hijazi
Honored Contributor

Re: Search string based on a character and remove or scramble

you can use the following script:
load if(wildmatch(field,'*@*'),autonumber(field),field) as field

autonumber converts the string value to a number

you can use other functions like Hash128 and other

check help for more details

Re: Search string based on a character and remove or scramble

I think it should be more like this (you missed an asterisk at the end of the string)

If(WildMatch(field, '*@*'), AutoNumber(field), field) as field

you can make it more precise by adding the .* also.

If(WildMatch(field, '*@*.*'), AutoNumber(field), field) as field

ali_hijazi
Honored Contributor

Re: Search string based on a character and remove or scramble

fixed

thanks for the attention

Community Browser