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
5 replies
Subscribers
4 subscribers
Views
5282 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Reports
Display String Fields with queryAggregation
Kyle Jorgensen
over 7 years ago
I am building a budget report that displays budget data (which is tracked and stored by quarter) by project.
I have a requirement to be able to display the total budget per project for a specific year and quarter that a user inputs. See attached for a mockup of what I am looking for.
I have a DB view configured to display information about a project grouped by Project, Year, and Quarter. I am then trying to use query aggregation to sum budget values based on user input, however I am running into an error when I try to pass string fields through the queryAggregationColumn function using "MAX" or "MIN". Any idea of how to display string values alongside decimal values that are aggregated based on user input?
OriginalPostID-257488
Discussion posts and replies are publicly visible
0
Sally Mason
Appian Employee
over 7 years ago
Have you tried converting the string input to using todecimal() or tointeger() (to match the type in the corresponding database view) before using it in the query?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Kyle Jorgensen
over 7 years ago
The issue isn't with the user input (both are int), rather with queryAggregation being unable to handle text, in the attached mockup it would be the "Project Name" and "Division Fields". I need to display those fields, but aggregate the labor and material fields based on user input.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Karthik
over 7 years ago
@kyleg, can you please share the code ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rodgraham
Certified Lead Developer
over 7 years ago
Are you using isGrouping:true on the text fields? Sounds like you want to be grouping by the project name and division in addition to the grouping you've got in your view already?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Kyle Jorgensen
over 7 years ago
@rodgraham That was it; I set that to true for the other text fields in addition to ID field that I was already grouping on and that worked. Thanks for the help!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel