Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
3 replies
Subscribers
8 subscribers
Views
2421 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I was exploring more on the simple if() function. Ideally the function is writte
georgej
over 9 years ago
I was exploring more on the simple if() function. Ideally the function is written with three parameters
for e.g:- if(condtion,valueiftrue,valueiffalse), but to my surprise I found that following expression is also legitimate
fn!if( false(), true(), false(), 1, 2, 1, 2) and this will return 1 ; also I found if() can accept any number of parameters provided the number of parameters is odd. Can somebody throw more insight into these nuances of if() function. Are there any other interesting functions which can be made very powerful lik this.
OriginalPostID-150245
OriginalPostID-150245
Discussion posts and replies are publicly visible
Parents
0
nareshs427
Certified Senior Developer
over 9 years ago
Hi George,
Passing more than 3 (odd) parameters to if(), converts the expression into a nested if structure which means your expression will be converted to
fn!if( false(), true(), if(false(), 1, if(1, 1, 2)))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
nareshs427
Certified Senior Developer
over 9 years ago
Hi George,
Passing more than 3 (odd) parameters to if(), converts the expression into a nested if structure which means your expression will be converted to
fn!if( false(), true(), if(false(), 1, if(1, 1, 2)))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data