Mark Wilson
asked on
Problems with REPLACE
CR2008
I am using the following formula in a report, to replace certain
if {Command.narrative} like '*format*' then replace({Command.narrative },'format' ,' ') else
if {Command.narrative} like '*nostock*' then replace({Command.narrative },'nostock ',' ') else
{Command.narrative}
The problem is that the first line of the formula works but the 2nd line doesn't i.e. it doesn't replace any words with nostock in with ''.
Any help would be appreciated
I am using the following formula in a report, to replace certain
if {Command.narrative} like '*format*' then replace({Command.narrative
if {Command.narrative} like '*nostock*' then replace({Command.narrative
{Command.narrative}
The problem is that the first line of the formula works but the 2nd line doesn't i.e. it doesn't replace any words with nostock in with ''.
Any help would be appreciated
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Replace(Replace({Command.n
The 1 tells replace to do a non-case sensitive replace
Your method fails because you have the second test in the else clause so it is only tested for strings that don't have format in them.
mlmcc