Questions tagged [dynamicparameters]

48 questions
6
votes
1 answer

Dynamic parameter value depending on another dynamic parameter value

Starting premise: very restrictive environment, Windows 7 SP1, Powershell 3.0. Limited or no possibility of using external libraries. I'm trying to re-write a bash tool I created previously, this time using PowerShell. In bash I implemented…
oblio
  • 1,519
  • 15
  • 39
5
votes
1 answer

What is the correct usage of DynamicParameters (Dapper) for a varbinary datatype?

A stored procedure returns, amongst other things, a varbinary(max) as an OUTPUT. I can't understand how to access this information using Dapper. Below is some cut-down sample code which illustrates the problem. I supply some parameters to a…
Q''
  • 399
  • 5
  • 15
4
votes
1 answer

Jenkins ExtendedChoicePlugin : Unable to fetch choices from postgres db

I am trying to run below piece of groovy script with ExtendedChoiceParameter plugin but i see an empty list. @GrabConfig(systemClassLoader = true) @Grab(group = 'org.postgresql', module = 'postgresql', version = '9.4-1205-jdbc42') import…
4
votes
1 answer

Adding Comment-Based Help Breaks Get-Help for Dynamic Parameters

If I have a function with dynamic parameters, how can I add comment-based help so that when the user runs Get-Help it will still show the dynamic parameters? e.g. Here is my function without any comment-based help function Test-DynamicParam{ …
Micah Hunsberger
  • 236
  • 1
  • 10
2
votes
1 answer

Drake: Integrate Mass Matrix and Bias Term in Optimization Problem

I am trying to implement Non Linear MPC for a 7-DOF manipulator in drake. To do this, in my constraints, I need to have dynamic parameters like the Mass matrix M(q) and the bias term C(q,q_dot)*q_dot, but those depend on the decision variables q,…
2
votes
2 answers

Generating dynamic validate set based on value of another parameter in PowerShell

A little background: We are working on a function that goes through hundreds of entries, similar to the following: City State Population New York New York 8467513 Los…
Ram Iyer
  • 319
  • 1
  • 4
  • 14
2
votes
1 answer

Using deploy time parameters in CDK 'codepipeline_actions.CloudFormationCreateUpdateStackAction'

I am clearly not understanding how dynamic parameters can be used when deploying a template in CodePipeline. Here is the basic scenario: CodeBuild BUILD Action - Here I have retrieved, for instance, a value for COMMIT_NUMBER. This can be set as an…
2
votes
2 answers

Conversion failed when converting the varchar to data type int: SQL

I am creating a web app in asp.net mvc I have a query which looks like below using (SqlConnection conn = new SqlConnection(_connStr)) { conn.Open(); var p = new DynamicParameters(); p.Add("@SP_RoleId", "7,8,9", dbType: DbType.String,…
2
votes
0 answers

Dynamic dependent parameters in PowerShell

I need to create a PowerShell function with dynamic parameters that are dependent on each other ($server, $database, $table). 1. When the user picks $server, parameter $database needs to be auto-populated. 2. And, depending on what value…
RaviLobo
  • 447
  • 2
  • 10
  • 29
2
votes
2 answers

Dynamic parameters depending on environment variables (Vhost)

I’m currently working on a symfony project for our company. And I have issues figuring out how to build a dynamic configuration from an environment variable. My main problem here is that symfony caches my “defaut_database” once, and then never…
2
votes
0 answers

Powershell: can't use -pipelinevariable with get-netfirewallrule (dynamic parameters)

How come I can't use -pipelinevariable with get-netfirewallrule? PS C:\> Get-NetFirewallRule -PipelineVariable myfirewall | Get-NetFirewallPortFilter Get-NetFirewallRule : Cannot retrieve the dynamic parameters for the cmdlet. Object reference not…
js2010
  • 23,033
  • 6
  • 64
  • 66
2
votes
2 answers

PowerShell - Can I make a parameter set depend on the value of another parameter?

Let's say I have a function like: function Authenticate { param ( [ValidateSet('WindowsAuthentication','UsernameAndPassword')] [string]$AuthenticationType, [Parameter(ParameterSetName='ParamSet1')] …
cogumel0
  • 2,430
  • 5
  • 29
  • 45
1
vote
1 answer

Using Dapper in C# and Heidi´s Stored Procedure, I get a null value

I´m new at this, so maybe the problem is quite obvious for you, but for me it has been a time consuming attempt. I am building a parking program in C# and am using Dapper to query a MariaDB database that I manage through Heidi. I am using VS2022, C#…
vmroche
  • 11
  • 3
1
vote
1 answer

Dapper Dynamic Parameter wirth optional return value asp.net mvc

Hello I have a common function which looks like below, public async Task ExecuteAsync(string spName, DynamicParameters p) { SPResponse response = new SPResponse(); using (SqlConnection conn = new SqlConnection(_connStr)) { …
Ibrahim shaikh
  • 235
  • 2
  • 15
1
vote
0 answers

Send list of int to sql sp throught dapper dynamic parameters

I need to call a sql stored procedure which have an input parameter with type "IntList" that is a user-defined table type,I wanna set this parameter with a list of int through dapper dynamic parameter, in this case I don't have Structured dbtype,…
Masoumeh Karvar
  • 791
  • 1
  • 14
  • 32
1
2 3 4