Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'd like to rename several values in a field through setting an expression on the forefront.
Say, value 'A' to value 'A1', 'B' to value 'B1', 'C' to value 'C1'.
What syntax should be used then?
Thank you in advance,
Larisa
Maybe something like this:
If(match(Field, 'A', 'B', 'C'), Field & '1', Field)
If there are more values which needed to be renamed more complex a mapping-table would be useful.
- Marcus
You can use Replace() function
Do you mean embedded Replace?
Replace(Replace(Field, Value, Value2), Value3, Value4))
I see,
Is embedded Replace a good option?
Replace(Replace(Field, ValueOld1, ValueNew1), ValueOld2, ValueNew2))
=Replace(Field,Field,Field&'1')
Yes, but if A should be renamed to Apple, B to Bright, C to Clever, this approach won't work. I see that I could use a mapping table, but I am searching for a simpler solution.
pick(wildmatch(Field,'A','B','C', '*'),'A1','B1','C1',Field)
Hi,
another solution could be:
hope this helps
regards
Marco
I'd like to rename several values in a field
=Replace(Fieldname,Fieldname,Fieldname&'1')