I am trying to define a function in which the dynamic parameters are dependent on each other. For example, I might have 1 parameter and two dynamic parameters:
$rootPath
: The drive letter.$rootPathItem
: The first folder within the drive letter.$rootPathChildItem
: The second folder within the first.
The question is: how do I make it so that the ValidateSet
for $rootPathChildItem
is dependent on the other dynamic parameters? At its core, there doesn't seem to be a way to read the value of a dynamic parameter while inside the DynamicParam
block (although in the begin block it is no problem). (Note, that this is just an example. I could change the initial parameter to be the months remaining in the year, for example.)
Ultimately, the question is how do I define dynamic parameters such that the second dynamic parameter is dependent on the selection of the items in the first dynamic parameter.
Help would be most appreciated.
Thanks in advance!
Mark