<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D50Z00008C3jkxSABOkta Classic EngineAdministrationAnswered2024-06-30T10:29:26.000Z2017-07-11T05:12:57.000Z2017-07-11T05:12:57.000Z
Group membership rule errors
New to Okta, trying out group membership rules. According to https://help.okta.com/en/prod/Content/Topics/Directory/Directory_Groups.htm#ConditionsEE3, "Any function supported in Okta Expression Language." is supported. But when I enter this as a rule (just as an experiment):

  
  1.  Convert.toInt('1') > 0
 I get an error: 
  1.  Unsupported expression constructs are used in expression Convert.toInt('1') > 0
 What am I missing? Thanks!

  • j5v7c (j5v7c)

    Hello J.K., can you tell me exactly what are you trying to achieve with that expresion
  • j5v7c (j5v7c)

    With that particular expression? A boolean result of true, and that any user will match the rule. This is just an experiment. But if this simple expression doesn't work, more complex (and useful) ones surely won't either. And I read the docs.
  • tftwh (tftwh)

    Hi JK,

     

    This is a perfect question you have asked.

    Here is the solution for your query

    'Convert.toInt('1')' > 0

    or

    'Convert.toInt('1')' > '0'

    Because return type of Convert is Integer and that comparision not gonna work her. So convert that way. Hope this satisfied your query.
    Expand Post
  • tftwh (tftwh)

    If not you can try "Convert.toInt('1')" > 0. Sometimes copy paste wont work i suggest to type 🙂
  • j5v7c (j5v7c)

    Unfortunately that doesn't work, Yogendra. It should be treated as an expression, not a quoted string literal.
This question is closed.
Loading
Group membership rule errors