Interface should be a rule

I just ran accross an interface that throws errors when I try to test it.  I noticed that it is running a!queryEntity so it should be an expression rule.  Is there an easy way to change it from an interface to an expression rule?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    We could use a bit more info here.  What are the errors?  What makes you think it should be an expression rule just because it's running an a!queryEntity()?  The real determination for this would be whether the main result of the evaluated expression is a visual element such as a component or form element (form layout, section, box, etc, or any single input component or array thereof).

    If it really does need to be an expression rule, the simplest (and probably only) solution is to copy the code into a new expression rule editor and save it there instead.  There's no direct or supported way to change interfaces to expression rules or vice versa.

Reply
  • 0
    Certified Lead Developer

    We could use a bit more info here.  What are the errors?  What makes you think it should be an expression rule just because it's running an a!queryEntity()?  The real determination for this would be whether the main result of the evaluated expression is a visual element such as a component or form element (form layout, section, box, etc, or any single input component or array thereof).

    If it really does need to be an expression rule, the simplest (and probably only) solution is to copy the code into a new expression rule editor and save it there instead.  There's no direct or supported way to change interfaces to expression rules or vice versa.

Children