Is there a case statement /function in Appian . or an if ...else if in rules exp

Is there a case statement /function in Appian . or an if ...else if in rules expressions . Coding in terms of if , if ... is time consuming and code readability is bad .

OriginalPostID-219960

OriginalPostID-219960

  Discussion posts and replies are publicly visible

Parents
  • @dhirajk Hi, fn!displayvalue() can be an option as well. Though the readability is bad, I would suggest leaving the code as is, because it may not be a great idea to pull the results of the each condition into an separate expression rule, as the expression rule in-turn consumes some time for initialisation, processing and returning the output which ultimately increases the total execution time. Doing so on need basis(for instance, when the conditional output is a frequently changing, or is reusable, or contains a huge piece of code) might be worth rather than just for sake of improving the readability.

    An other option is to build a matrix in database but it really depends on the nature of the requirement.
Reply
  • @dhirajk Hi, fn!displayvalue() can be an option as well. Though the readability is bad, I would suggest leaving the code as is, because it may not be a great idea to pull the results of the each condition into an separate expression rule, as the expression rule in-turn consumes some time for initialisation, processing and returning the output which ultimately increases the total execution time. Doing so on need basis(for instance, when the conditional output is a frequently changing, or is reusable, or contains a huge piece of code) might be worth rather than just for sake of improving the readability.

    An other option is to build a matrix in database but it really depends on the nature of the requirement.
Children
No Data