skip to Main Content
@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


  1. Chosen as BEST ANSWER

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

    This works


  2. 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.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search