Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Let say I have multiple field values I need to replace, what would be the best option?
For example
Ali, Bob, Abu
I want to change
Ali to firstperson
Bob to secondperson
Abu to thirdperson
What the best possible way? I'm aware that REPLACE function would do the job but apparently I not sure if it able to handle multiple replace function. Or should I be using IF function to handle multiple replacing values?
Hi,
If Ali, Bob, Abu... is the whole content of the field. I think ApplyMap function could help in the script.
If you want to do it from chart expression, try this:
Pick(Match([Name], 'Ali', 'Bob', 'Abu'),
'FirstPerson',
'SecondPerson',
'ThirdPerson')
Aside from APPLYMAP function, is IF function much suitable to tackle REPLACE function for this type of scenario?
You can use IF or Pick-Match which I proposed above. But for me I prefer Pick-Match rather than IF for its readability when you have a complex condition.