This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Debating whether or not to upgrade to the latest version of Alteryx Designer?
- edited on
Suppose you need to change single quotes to double quotes in an expression (i.e. write a formula in an Action, Condition, Filter, Formula, Generate Rows, Multi Field Formula, Multi Row Formula, Charting, Report Map, Table, Message, or Test tool).
To do this, you use the REPLACE function. This is a string function in the format:
REPLACE([FieldName], ‘x’, ‘y’)
, where ‘x’ gets replaced by ‘y’ in the ‘FieldName’ field.
Generally, it is not a good idea to mix single quotes with double quotes as this can sometimes produce unexpected results.
In other words, avoid using this syntax:
REPLACE([FieldName], ‘x’, “y”).
So you might be tempted to write your REPLACE expression like this:
But this gives you the ‘Malformed Function Call’ error message.
At this point, you may think the double quotes need to be single quotes like this:
But, again, you get the ‘Malformed Function Call’ message.
For this expression to work correctly, the expression shold be written like this:
In other words, the single quote needs to be wrapped by double quotes, and the double quote needs to be wrapped by single quotes!
The example expressions in this article were produced using version 10.1 of Alteryx Designer.