Sometimes there is no value after converting elapsed time in portal.

I am using "getportalreportdatasubset" and APPIAN 7.7 . Here I am facing strange issue with the report column named "Elapsed time" which is saved as "Duration" data type in portal report.
Expression to Calculate Elapsed time is : pp!starttime-(if(find("/",pv!cdtClientReportDetails.DocCreatedDate)=0,gmt(datetime(left(pv!cdtClientReportDetails.DocCreatedDate,4),mid(pv!cdtClientReportDetails.DocCreatedDate,6,2),mid(pv!cdtClientReportDetails.DocCreatedDate,9,2),mid(pv!cdtClientReportDetails.DocCreatedDate,12,2),mid(pv!cdtClientReportDetails.DocCreatedDate,15,2),right(pv!cdtClientReportDetails.DocCreatedDate,2))),gmt(pv!cdtClientReportDetails.DocCreatedDate)))

I have created new column and saved value of this "Elapsed time" (same expression) as Number(Rounded to 2 Decimal Places).I am converting this decimal value in Year, days, hours format in my SAIL code, For this I am using expression rule , Sometimes I get value sometimes blank value from Portal. Th...

OriginalPostID-151165

OriginalPostID-151165

  Discussion posts and replies are publicly visible

Parents
  • @poojas It would be worth giving a try by doing as follows:

    Approach - 1:
    1. Change the data type of the input in the expression to 'Any Type'
    2. Cast the input from 'Any Type' to Decimal in the expression.

    Approach - 2:
    Else cast the contents of the desired column in the datasubset to Decimal and then pass the resultant data to the expression.

    So, in either of the case make sure that the data of type 'Number Decimal' is passed to the expression because the data we obtain from the portal report is not the same as the data type we see in the portal report.

    Hope the above approach might give you some leads.
Reply
  • @poojas It would be worth giving a try by doing as follows:

    Approach - 1:
    1. Change the data type of the input in the expression to 'Any Type'
    2. Cast the input from 'Any Type' to Decimal in the expression.

    Approach - 2:
    Else cast the contents of the desired column in the datasubset to Decimal and then pass the resultant data to the expression.

    So, in either of the case make sure that the data of type 'Number Decimal' is passed to the expression because the data we obtain from the portal report is not the same as the data type we see in the portal report.

    Hope the above approach might give you some leads.
Children
No Data