@string(equals(substring(pipeline().globalParameters.ENVIRONMENT_ROOT_FOLDER,0,2)),(substring(pipeline().parameters.TargetPath),1,3)))
this throws error :: function ‘equals’ does not accept 1 argument(s)
- basically this code wants to check what is current environment and if
the target path contains the current environment , this will go to
false. - For example if i am running this ADF pipeline from DEV and target
path contains a path with a location from dev ( say devxyzkty) it
will fail /go to false. else it will be true
2
Answers
@equals(tolower(pipeline().globalParameters.ENVIRONMENT),'prod')
This works
I got the same error when I have tried to use the similar dynamic content as yours with my parameters.
)
before specifying the second argument inside equals function and therefore while parsing the expression, this extra parenthesis is being considered as end of equals function. So, removing it gives the desired result (Even the second substring has some errors, I have changed it as required).root_folder
andtarget_path
parameters with your required values.