Replace function not taking variable
Posted: Wed Jul 27, 2016 12:23 pm
I set a variable called "current_file" to the following:
"\\GENERAL\Vol1\Groups\UHC\Common\Rerates\2016-2017\PDFs\Test_Rerate2016.pdf"
I then tried to replace some of the text in the variable current_file as shown below:
${Replace(current_file, '\\GENERAL\Vol1\Groups\UHC\Common\Rerates\2016-2017\PDFs\', '')}
When I run this it gives me an error stating:
"An unexpected error occurred. Function 'Replace': Parameter '1' must be a string value. Function definition: 'Replace(text, regex, replacement) returns string' Original expression: Replace(current_file, '\\GENERAL\Vol1\Groups\UHC\Common\Rerates\2016-2017\PDFs\', ''). "
Why is it not allowing me to use a variable in parameter 1? The user guide says that I should be able to use "Any string, variable or function that returns a string value"
Thanks!
"\\GENERAL\Vol1\Groups\UHC\Common\Rerates\2016-2017\PDFs\Test_Rerate2016.pdf"
I then tried to replace some of the text in the variable current_file as shown below:
${Replace(current_file, '\\GENERAL\Vol1\Groups\UHC\Common\Rerates\2016-2017\PDFs\', '')}
When I run this it gives me an error stating:
"An unexpected error occurred. Function 'Replace': Parameter '1' must be a string value. Function definition: 'Replace(text, regex, replacement) returns string' Original expression: Replace(current_file, '\\GENERAL\Vol1\Groups\UHC\Common\Rerates\2016-2017\PDFs\', ''). "
Why is it not allowing me to use a variable in parameter 1? The user guide says that I should be able to use "Any string, variable or function that returns a string value"
Thanks!