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
10 replies
Subscribers
8 subscribers
Views
7730 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Single vs Multiple output from IF expression
ajinkyab277
Certified Lead Developer
over 8 years ago
if(
rule!getEmployeeByEmployeeId(ri!employeeId).employeeTypeId = 1,
rule!getFormDataForEmployee(1,2),
{/*Another code*/}
)
In above expression, I use employee id to get Employee data from database using query rule. and based on employee type I call another rule where I pass some hardcoded value(1,2) for the parameter. Ideally, this expression should return me an array of 2 value but it is returning 1 value only.
However if I test condition independantly rule!getEmployeeByEmployeeId(ri!employeeId).employeeTypeId = 1 this returns me true and rule!getFormDataForEmployee(1,2) returns me array of 2 value
Has anyone faced this issue before?
Thanks
Ajinkya
OriginalPostID-251731
Discussion posts and replies are publicly visible
Parents
0
rodgraham
Certified Lead Developer
over 8 years ago
You can cast an array to a single element for if checking to make it work or as you've done use [1]
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
rodgraham
Certified Lead Developer
over 8 years ago
You can cast an array to a single element for if checking to make it work or as you've done use [1]
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data