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 (272k 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

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

Hi, I'm working on a custom command to set account expiration - like this No matter what time is selected by user - it set's to 23:59. But in the approval email - ... the one, which was selected by user. Can it be modified before sending for approval? Thanks!

asked Jul 25, 2019 by Dmytro.Rudyi (920 points)
0 votes
1 answer

We have a number of PowerShell scripts I'd love to expose to normal users simply by adding them as Custom Commands, my problem is they require additional ... with the intuitive GUI and utilise existing Adaxes features regarding PowerShell and Custom Commands.

asked Nov 13, 2017 by Staj (350 points)
0 votes
2 answers

I've had a couple custom commands configured since 6/2023 and they've been working just fine up until recently (sometime within the past few weeks or so). Here's a general ... something obvious here. But I can't make sense of why this is suddenly an issue.

asked Mar 20 by msinger (110 points)
3,346 questions
3,047 answers
7,782 comments
544,986 users