Skip to main content
November 7, 2023
Question

Error: Keyword Argument unsupported by function

  • November 7, 2023
  • 3 replies
  • 0 views

I am trying to implement a basic expression rule to determine if a short string is formatted correctly. I have the code below but it returns the error "Keyword Argument unsupported by function contains". I am getting similar errors in other parts of my application so I'd like to figure out what the error means.

    3 replies

    mikes0011
    Brainy
    November 7, 2023

    It means what it says.  The function "contains()" is a primitive function which doesn't accept keyword syntax.  It is called simply by passing in the parameters required (always and exactly two, an array then the value you want to find).  E.G. "contains({1, 2, 3}, 2)" will evaluate to TRUE.

    Sadly there's no easy way to tell which OOB functions support keyword syntax and which ones don't - other than, if you get that error, you know it doesn't.

    November 8, 2023

    Hi josephh163,

    As it is clearly we can make out from reading the error itself that the keywords that you have used inside the contains function is not supported here we need to directly pass the values without passing the keyword arguments and yes as mikes0011 has mentioned that it is not easy to tell which function supports keyword argument and which not, this you only get to know while practicing these type of functions.

    stefanhelzle0001
    November 8, 2023

    At least, all functions in the "a!" domain support keyword syntax.