Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Suggested Answer
+2
person also asked this
people also asked this
Replies
8 replies
Answers
3 answers
Subscribers
10 subscribers
Views
17646 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Is there a case statement /function in Appian . or an if ...else if in rules exp
Dhiraj Kumar
over 8 years ago
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
0
sikhivahans
over 8 years ago
@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.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
sikhivahans
over 8 years ago
@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.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data