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
7 replies
Subscribers
7 subscribers
Views
2036 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Hi All, There is possible to format field inside a!queryAggregationColumn f
heriz
over 10 years ago
Hi All,
There is possible to format field inside a!queryAggregationColumn function?
My script is like below:
a!queryAggregationColumn(
field:"dateTrans",
alias:"qt",
visible:true(),
isgrouping:true()
)
I want to format field 'dateTrans' from "dd/mm/yyyy" to "mmm yyyy".
This 'dateTrans' field stored in data store with data type of Date.
Thanks before.
Regards...
OriginalPostID-112860
OriginalPostID-112860
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 10 years ago
The format of the date is associated with the locale (e.g. en_US vs en_GB) the closest you can get to mmm yyy is mm/dd/yyyy if your users set their preference to en_US
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
heriz
over 10 years ago
Hi Eduardo, thanks for your response. For this case, as we know we can format the date field using text() for getting result with "mmm yyyy" format (text(dateTrans, "mmm yyyy")).
But, we got the issue when we want to show grouping data in Tempo Report.
We want to show Column Chart with source from data store. And in my data store, dateTrans stored with date format.
There is any work around for showing report with formatted grouped data ? (Dimension : dateTrans (Month Year), Calculation: count IdTrans )
Thanks you.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
The queryAggregationColumn doesn't take any formatting
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
heriz
over 10 years ago
Okay, can you help me provide the work around on this case?
Below is my script:
=load(
local!data: queryrecord(
recordType: cons!TransRecord,
query: a!query(
aggregation: a!queryAggregation(
aggregationColumns: {
a!queryAggregationColumn(
field: "dateTrans", /* <----- want to show in mmm-yyyy format */
alias: "label",
visible: true,
isGrouping: true
),
a!queryAggregationColumn(
field: "idTrans",
alias: "data",
visible: true,
aggregationFunction: "COUNT"
)
}
),
pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: -1,
sort: a!sortInfo(
field: "label",
ascending: true
)
)
)
).data,
a!columnChartField(
series: local!data,
showDataLabels: true
)
)
Thanks.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
heriz
over 10 years ago
Hi all, anyone have a solution for this case? Thanks a lot.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chase.putnam
over 10 years ago
As the queryAggregationColumn does not take any formatting, there would be no work around except to use have the user's set their locale to view the data accordingly as Eduardo recommended above.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Michael Tan
Appian Employee
over 10 years ago
Another alternative is to handle the aggregation by creating a database view to aggregate your data in the desired date format.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel