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
9 replies
Subscribers
5 subscribers
Views
2737 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Reports
116222 - no subject - #Appian 7.5\n\nI have a portal report wi
simranjits
over 9 years ago
#Appian 7.5
I have a portal report with Lag() function as a column definition. This returns a "duration". In my process model, I am using Execute Process report smart service. Although the portal report shows data in the format: "5 days 23 hrs 48 mins", the same data obtained via the smart service comes in the format: "5::23:48:35.802". How should I format the data so that value is obtained in dd-hh-mm format.
I tried using todecimal(Lag()) as the column definition(this was mentioned in one of the earlier forum posts) on the portal report but with no success. Please suggest....
OriginalPostID-116222
Discussion posts and replies are publicly visible
0
ashishd
over 9 years ago
There is no any in build function available which will format the data specified i.e. "5::23:48:35.802", but you can write an expression in the column to show it in the required format.
i.e. you can write below expression in report for Lag Column(Normal Text):
=split(joinarray(split(Lag(),"::"),":"),":")[1]&"-"&split(joinarray(split(Lag(),"::"),":"),":")[2]&"-"&split(joinarray(split(Lag(),"::"),":"),":")[3]&"-"&split(joinarray(split(Lag(),"::"),":"),":")[4]
This will return the data in dd-mm-hh-ss format.
Hope this works for you.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sponnada
over 9 years ago
Its giving me data in the format: -6,260,906.1401
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ashishd
over 9 years ago
Try using tostring(Lag()) instead of Lag() in above expression. Also make sure column type is normal text.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
simranjits
over 9 years ago
Tried with no success :(
Output: -6,260,909
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ashishd
over 9 years ago
Can you please share the expression?
Is it a task report you are using?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
simranjits
over 9 years ago
It is process model optimization report and I am using the function Lag() there. I am applying the code you sent in this portal report's column definition.Simply using the Lag() function renders the duration on portal but this data doesnt renders on tempo if I use Portal to SAIL plugin. As a workaround, I am using Execute process report smart service as an intermediate layer. Lag() gives good data on portal report but faulty data using the smart service.
Using the following expression for the column definition on my portal report:
split(joinarray(split(Lag(),"::"),":"),":")[1]&"-"&split(joinarray(split(Lag(),":"),":"),":")[2]&"-"&split(joinarray(split(Lag(),":"),":"),":")[3]&"-"&split(joinarray(split(Lag(),"."),":"),":")[4]
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ashishd
over 9 years ago
Okay, the expression works fine for normal task reports.
Need to modify Process Optimization report.
In this case, you can write below expression in output of the "Execute Process Report"
joinarray(split(joinarray(split(tostring(ac!ActLag),"::"),":"),":"),"-")
This will return the string which you can split on ";" to get an array.
Do not change any column in the Report.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
simranjits
over 9 years ago
I did that yesterday and it worked fine. Thanks :)
Works even if we dont use tostring().
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
TJ
A Score Level 2
over 9 years ago
=load(
var:reject(fn!isnull,split("5::23:48:35.802",":")),
var[1]&"-"&var[2]&"-"&var[3])
Replace data in local!var with your function
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel