Welcome to Microsoft Q&A platform and thanks for posting your question here.
As I understand your query, you want to replace the string '{variables('testValue')}' to the value holded by variable. For this you tried using set variable activity , however, adf is returning the same input string as output. Please let me know if that is not the correct understanding.
I tried to reproduce your case, it looks like the symbols are not being treated as a valid string when we use replace function .
The workaround I would suggest is to remove all the symbols by the following expression
and then replace the remaining string variables(testValue)
with the variable value.
So here is the reference video of the pipeline.
- Use lookup activity to fetch the table content
- Associate two set variable activities with it. First one referencing
var1
with this expresion:
@replace(replace(replace(replace(activity('Lookup1').output.firstRow.col1,'{',''),'}',''),'\',''),'"','')
And second set variable referencing var2
having the value you specified , say, 'GUID'
- Add another set variable activity to replace 'variables(testValue)' with 'GUID'
@replace(variables('var1'),'variables(testValue)',variables('var2'))
Hope it helps. Please accept the answer and mark it as helpful. Thanks