0
@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 dev\xyz\kty) it will fail /go to false. else it will be true
RubenSo
  • 33
  • 9

2 Answers2

0

I got the same error when I have tried to use the similar dynamic content as yours with my parameters.

enter image description here

  • The error is because there is an additional ) 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).
@string(equals(substring(pipeline().parameters.root_folder,0,2),substring(pipeline().parameters.target_path,1,3)))

enter image description here

  • Replace the root_folder and target_path parameters with your required values.
Saideep Arikontham
  • 5,558
  • 2
  • 3
  • 11
0

You can use this :

@equals(tolower(pipeline().globalParameters.ENVIRONMENT),'prod') 

this resolved the issue

RubenSo
  • 33
  • 9