on 2020 Sep 04 6:23 AM
Hi all,
I am working with "SAP BusinessObjects Business Intelligence 4.2" and have the following problem. I need to replace certain strings within a variable by another string.
E.g. if the strings is "abc", "odo" or "xyz", it needs to be replaced by ths string "TEST".
If the content of my variable is "ddddddabcddddd", it should result in "ddddddTESTddddd".
If the content of my variable is "ddddddododdddd", it should also result in "ddddddTESTddddd".
If the content of my variable is "ddddddxyzddddd", it should also result in "ddddddTESTddddd".
...
It is easy to do this, if there is just one string to be replaced, but in my case there are about 15 strings that need to be replaced in the described way.
Hi,
Create another variable using inlist operator..
v1= if([string]inlist("abc";"odo";"xyz")) then "test" elseif([string] inlist("def";"ghi") )then "test1" else [string]
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thank you for the quick answer, but this is not exactly what I need ...
I want to replace a string within another string and not the complete string!
"ddddddabcddddd" --> "ddddddTESTddddd"
This solution works when you need to replace complete strings, but not parts of a string.
Any ideas?
BR,
Henning
User | Count |
---|---|
79 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.