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
16 replies
Subscribers
2 subscribers
Views
3921 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Reports
100749 - no subject - I am trying to create a simple report of
Keith
over 11 years ago
I am trying to create a simple report of tasks that are late. I have it created. I created a filter set for the task status so you can see completed, assigned and accepted statuses. I want to also have a choice of Active. I have tried and tried and tried to make this happen and everything I try is not working.
I even created a rule with: called activeTask with =if(ri!taskStatus="Active",1,
if(ri!taskStatus="Assigned",1,
if(ri!taskStatus="Accepted",1,0)))
When I put try : =rule!activeTask(task_status()) I get all 0s in the report and no 1s.
What am I doing wrong?
I tried the if expression without a rule and it would not produce desired result either.
I don't want to be negative - but - simple things like this cause people not to want to learn how to do reports on their own.
...
OriginalPostID-100749
Discussion posts and replies are publicly visible
0
jesse.triplett
Appian Employee
over 11 years ago
Testing just that if statement with a text input seems to work fine. You could try using the like() or exact functions instead of the "=" , I think I've ran into something similar in the past. Have you used typename(typeof(ri!taskStatus)) to be sure the input is a text?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Keith
over 11 years ago
Thank You for the tips - however - this did not work either. If I test the rule, I get the desired results. However the report is showing all 0s.
I changed the rule to be this.
=if(like(typename(typeof(ri!taskStatus)),"Active"),1,
if(like(typename(typeof(ri!taskStatus)),"Assigned"),1,
if(like(typename(typeof(ri!taskStatus)),"Accepted"),1,0)))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Keith
over 11 years ago
I reported this worked - I am getting 0s even in the rule.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jesse.triplett
Appian Employee
over 11 years ago
Sorry, I wasn't very clear. I meant try the like() function, and if that still doesn't work, double check that your input is being read as type text by having the expression just be typename(typeof(ri!taskStatus)) (no if statements at all, just checking that the output of this statement is the word "text" like expected.
if(like(ri!taskStatus,"Active"),1,
if(like(ri!taskStatus,"Assigned"),1,
if(like(ri!taskStatus,"Accepted"),1,0)))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Keith
over 11 years ago
I even tried this... It worked in the rule - but - not in the report.
=if(like(tostring(ri!taskStatus),"Active"),1,
if(like(tostring(ri!taskStatus),"Assigned"),1,
if(like(tostring(ri!taskStatus),"Accepted"),1,0)))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jesse.triplett
Appian Employee
over 11 years ago
Can you put in the code for your report?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Keith
over 11 years ago
I do not see how to attach documents to this thread... I could email them to you.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jesse.triplett
Appian Employee
over 11 years ago
There is a little "add attachments" paperclip in the bottom left corner of comment box. It appears once you start typing a comment. You could also past the code as a comment if it's not extremely long
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Keith
over 11 years ago
In a data field in the report - I am trying to show the results. I want to see a 1 or 0 by calling the rule.
Here is what I have in the report.
I just added the tostring to it now and it did not help.
=rule!activeTask(tostring(task_status()))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jesse.triplett
Appian Employee
over 11 years ago
I'm not sure I understand --What is task_status(), a query rule? Does it have many statuses? Based on above it looks like rule!activeTask() is designed to accept a single value text as its input.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>