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
4 replies
Subscribers
7 subscribers
Views
2022 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I need some expression wizards out there to help a non-wizard (business analyst)
melissah
over 13 years ago
I need some expression wizards out there to help a non-wizard (business analyst) construct an expression.
I have a report that needs to be filtered to only certain process instances, based on the status text field of the instances. Basically I am constructing a report that shows all "Open Projects and those Completed within the last 30 days." I have no problem constructing a report containing all open projects, and a separate one containing those completed in 30 days. It's the combo that's difficult for me.
I want to say:
IF pv!status_text="Approved"or "Initial Assessment"or "In Process" or "In Queue"or "In Post Processing"or "In Conservation" (These are all of the "open" statuses)
OR
If there is a Completed Date (denoting that pv!status_text="Complete") and the date is within the last 30 days, include it in the report. So maybe something like:
lastndays(pv!projectCompletedDate_date,30)? Can this function be used here?...
OriginalPostID-33052
OriginalPostID-33052
Discussion posts and replies are publicly visible
0
melissah
over 13 years ago
...
This report would show any process instance in one of the open statuses above. It would also show anything that is completed within the past 30 days. It would NOT show anything that was completed with a date older than 30 days.
Also where do I put this expression? Within the status_text definition for the report?
Much thanks,
Melissa
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Nathan
over 13 years ago
when you have two filters it naturally will chose "AND" logic. if you want to use "OR" logic you will need to figure out how to combine the filters. This usually means that you need a new column in your report since you can't use "OR" logic on separate columns.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
joel
over 13 years ago
I am not sure if you have resolved this one, but I would use something like:
if(and(pv!status_text="Complete",todate(pv!projectCompletedDate)>=(today()-30)),true(),
if(contains({"Approved","Initial Assessment","In Process","In Queue","In Post Processing","In Conservation"},pv!status_text)=true(),true(),false()))
In a hidden column and then put a filter on the report over this column only showing cases were it is true. It might not be exactly what you are after but should put you on the right road.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
melissah
over 13 years ago
joel - thank you so much! I just set this up and it worked *perfectly*. You have been a huge help!
Melissa
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel