Forum Discussion

amaaiia's avatar
amaaiia
Skilled Sharer
2 years ago
Solved

Set Stored Procedure parameter name as variable

Is there any way to set a stored procedure parameters name as input variables and not as fixed strings?

I'd like to pass @item().param_name as variable as follows:

I've seen a possible solution, that is passing through Dynamic Content of source settings the full json string with parameters configuration as follows:

@json(string({"Params":{"ParameterName1":{"value":"ParameterName1Value","type":"String"}}}))
@json(string(concat('{"Params":{"',variables('par_name'),'":{"value":"',variables('par_value'),'","type":"String"}}}')))
But I get this error:

Which is the json struct format that Dynamic Content needs?

  • Missing ending .params:

    @json(string(concat('{"Params":{"',variables('par_name'),'":{"value":"',variables('par_value'),'","type":"String"}}}'))).params

2 Replies

  • amaaiia's avatar
    amaaiia
    Skilled Sharer

    Missing ending .params:

    @json(string(concat('{"Params":{"',variables('par_name'),'":{"value":"',variables('par_value'),'","type":"String"}}}'))).params
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi amaaiia ,

    Glad to know that you were able to get to a reoslution. Please continue using Fabric Community on your further queries.