Reputation: 2523
I have simple Lookup and Variable, but it fails.
I get strange error "string character '"' at position '16' is not expected". However I have not included '"' charactor to variable. I wonder what is wrong.
Lookup: Query:
SELECT COUNT(1) As 'RowCount' from [SalesLT].[Customer]
Set Variable1: Add Dynamic content:
@string(activity('Lookup1').output.firstrow.RowCount)
Error
{"error":{"code":"BadRequest","message":"ErrorCode=InvalidTemplate, ErrorMessage=The
expression 'string(activity(\"Lookup1\").output.firstrow.rowcount)' is not valid: the string
character '\"' at position '16' is not
expected.\"","target":"pipeline/pipeline1/runid/89b3ca4f-83dc-4a55-9fe9 -
c4e867f9cdba","details":null}}
Upvotes: 1
Views: 656
Reputation: 5044
You just have to use the array method, try below to set to variable.
@string(activity('Lookup1').output.value[0].RowCount)
With configurations as:
And lookup output:
Upvotes: 1