0 votes

Hello,

I believe I've come across a bug in 2019.1. When working inside a custom command with two parameters, I'm trying to add conditions to an Else if statement that look at the two parameters. When trying to add the second condition it simply overwrites the existing parameter condition, and doesn't allow me to have both parameters conditions under the same else if. I've tested this with the top level if statement and it works, but not inside an else if statement.

Any thoughts on how to make this work?
Thanks!

by (920 points)

1 Answer

0 votes
by (294k points)
selected by
Best answer

Hello Ryan,

We confirm this is an issue in Adaxes. We will fix it in the next release. For now, you can use the If PowerShell script returns true condition instead of the If <parameter><value> one. In the condition, use the below script. In the script, the $valueToCheck variable specifies the value that will be compared with the parameter value. If you need the script to return true when the parameter is checked, use the corresponding value specified in the parameter configuration.

$valueToCheck = "1" # TODO: modify me
$parameterValue = $Context.GetParameterValue("param-AddPhoto")

$Context.ConditionIsMet = $parameterValue -eq $valueToCheck

If this workaround does not meet your needs, we can provide you with a custom build of Adaxes that will include a fix for the issue.

0

That's perfect. Thanks!

Related questions

0 votes
1 answer

Is there a way to configure a Custom Command parameter to accept multiple values so I can then add them to a multi value attribute such as adm-CustomAttributeObjectMultiValue1 ... in my specific case I'm looking to use a directory object picker parameter

asked Nov 27, 2024 by AM (50 points)
0 votes
1 answer

We've the following script we want to use in Adaxes to create as part of user creation, to ask if the user will need a AWS workspace, then asks employeetype for different ... "Error") exit(-1) } else { $Context.LogMessage("Created workspace", "Information") }

asked May 3, 2024 by Plusa (20 points)
0 votes
1 answer

Dear support, I'm trying to automate network share creations via custom commands. They idea is to create share and groups with command A and schedule ... "ADS_SCOPE_BASE" $scopeItem.Exclude = $False $scopeItem.SetInfo() $task.ActivityScopeItems.Add($scopeItem)

asked Jan 27, 2020 by Dmytro.Rudyi (920 points)
0 votes
1 answer

We have several scripts that use the following action: $commandID = "{b4b66610-be71-403a-a6b7-8bcf51d200ef}" $user.executecustomCommand($commandID) is there syntax that allows ... is there another way to pass parameters to a custom command through scripting?

asked Jul 11, 2019 by ggallaway (300 points)
0 votes
1 answer

We're tryingo to create a custom task that would allow us to create a service account and run some logic. These need to start with "svc_". Im able to do this on ... possible? Alternatively, could I use the built in task and add additional fields to the form?

asked Jul 30, 2024 by ZoomGhost (280 points)
3,596 questions
3,283 answers
8,317 comments
548,255 users