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.
Discussion posts and replies are publicly visible
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.
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 Mike Schmitt 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.
At least, all functions in the "a!" domain support keyword syntax.