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
8 replies
Subscribers
7 subscribers
Views
3504 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
There is an issue with logical function "and" when used in expression
Vaibhav Tandale
A Score Level 1
over 8 years ago
There is an issue with logical function "and" when used in expression rule.
e.g. use below code in expression rule
fn!and(
ri!test1 = true()
ri!test2 = true()
)
Ideally, it should give syntax error as comma is missing after first condition. But SAIL designer does not throw any error and it evaluates the expression with wrong output
i.e. if inputs ri!test1 is true() and ri!test2 is false() in above expression rule then it gives output result as true() which is incorrect [correct output result is false()]
Now try below expression syntax (observe comma) which gives correct expected output result:
fn!and(
ri!test1 = true(),
ri!test2 = true()
)
My question here is about behavior of above expression (w/o comma):
Is this expected behavior in terms of checking for syntax errors? [not throwing error for missing comma]
If yes, please explain me how it is correct.
If no, then please consider it as a bug and fix...
OriginalPostID-218140
OriginalPostID-218140
Discussion posts and replies are publicly visible
Parents
0
shivakanthr
over 8 years ago
@cvaibhav,
Even i observed the same thing in 16.2 as well. Even i am not getting the error if i dont use COMMA between two conditions. But the thing i observed is if we dont put COMMA between two conditions, its considering only the first condition and returning result of that condition.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
shivakanthr
over 8 years ago
@cvaibhav,
Even i observed the same thing in 16.2 as well. Even i am not getting the error if i dont use COMMA between two conditions. But the thing i observed is if we dont put COMMA between two conditions, its considering only the first condition and returning result of that condition.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data