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
4 subscribers
Views
9347 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Reports
queryProcessAnalytics - reports
martinc8721
over 7 years ago
Hello people, is there any way to set an alias to the fields in a report in order to make the query easier to build and understand? (c1,c4) also, apparently the name field assignation does not follow the order of the columns in the report.
a!queryProcessAnalytics(
report: cons!OPEN_REIMBURSEMENT_REQUESTS,
groupContext: cons!EXPENSE_APPROVERS,
query: a!query(
pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 20),
logicalExpression: a!queryLogicalExpression(
operator: "AND",
filters: {
a!queryFilter(field: "c2", operator: "includes", value: "East"),
a!queryFilter(field: "c4", operator: ">", value: 10000)
}
)
)
)
OriginalPostID-269172
Discussion posts and replies are publicly visible
0
shivakanthr
over 7 years ago
As of now there is no OOB feature i think.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aloks0189
Certified Lead Developer
over 7 years ago
@martinc872 Do you want to have alias name instead of column c0, c1 etc... If it is then have a try on queryColumn(
field: c0,
alias: "name"
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
martinc8721
over 7 years ago
what I want to have the alias set on the report end to use a query like this:
filters: {
a!queryFilter(field: "Location", operator: "includes", value: "East"),
a!queryFilter(field: "Amount", operator: ">", value: 10000)
}
I dont want to have any "c2" or "c4" on my expression rule
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aloks0189
Certified Lead Developer
over 7 years ago
@martin you can try queryColumn(
field: c0,
alias: "name"
)
Inside queryProcessAnalytics,let's have some R&D , hope this might work
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jasmins
over 7 years ago
@martinc872 , To make the query easier to understand, you can try below option -:
with(
local!Location:"c2",
local!Amount:"c4",
a!queryProcessAnalytics(
report: cons!OPEN_REIMBURSEMENT_REQUESTS,
groupContext: cons!EXPENSE_APPROVERS,
query: a!query(
pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 20),
logicalExpression: a!queryLogicalExpression(
operator: "AND",
filters: {
a!queryFilter(field: local!Location, operator: "includes", value: "East"),
a!queryFilter(field: local!Amount , operator: ">", value: 10000)
}
)
)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aloks0189
Certified Lead Developer
over 7 years ago
As per @martin, I believe here still it doesn't make any sense to store column c0 , c1 etc into local! and using them for queryProcessAnalytics, because here again at initial we need to recognise the columns based on c0, c1 then instead of this, why can't we directly go for normal approach of queryProcessAnalytics, in this case also when we want to use this datasubset anywhere like grid, we need to recognise the property by column name like c0, c1, so I believe the question raised by Martin is still active, if somehow we can return a alias name from queryProcessAnalytics or else returning some meaningful name from report then only this might be more helpful
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
martinc8721
over 7 years ago
@aloks176, yeah that's exactly what I meant, I need to set an alias to columns in order to make easier to recognize them since some times report columns have same values
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 7 years ago
Have you considered using the columnConfigs data that's returned by the result of a!queryProcessAnalytics ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sandeepr373
A Score Level 1
over 7 years ago
i think currently there is no OOB feature like this..even if you look the result of a!queryProcessAnalytics , in columnConfigs data column name is coming in label section and field name is still c0,c1 etc.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
martinc8721
over 7 years ago
@philb, your suggestion was very helpful, however I am still not able to set the alias
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel