Portal Task report in Tempo and export that report in excel format

I want to display a portal Task report in Tempo and export that report in excel format.
I am using the a!queryProcessAnalytics() for excecuting the report. The output I get is in PortalReportDataSubset format.
This has two columns one is the user and the other is groups.
Now for display of this user in SAIL Grid is handled through apply, it is working fine.
For Exporting the report : we are doing a type conversion from PortalReportDataSubset to ExportableDataSubset.
This also works fine, but we want to apply the function of converting user id to username and groupids to group names in the columns.

I was trying to use function todatasubset(), that conversion has not worked as expected.
Does anyone know how to overcome this issue? Exporting username in Excel in Tempo Report.

Any help is highly appreciated.

OriginalPostID-225597

OriginalPostID-225597

  Discussion posts and replies are publicly visible

  • @rishij Hi, in order to do so, one of the fields in the data should hold the formatted User or Group data. That is, while building the data, you must also plan in such a way that the data contains additional fields to hold formatted content and these additional fields should be populated based on the contents of the actual fields(for example, apply a rule by name rule!AT_getUserOrGroupDisplay() which can be found at /search?q=OriginalPostID-199642, iteratively over the actual field and the formatted data should be assigned to the new field). Once when the data is ready, apply todatasubset() over the data and provide it to the 'datasubset' attribute of type!ExportableDataSubset().

    Once when your data (i.e.data hold by 'data' attribute inside 'datasubset') contains the formatted contents as fields, specify the name of the field(that holds formatted data) in the fieldNames and fieldLabels and the plugin will be now able to export the desired data for sure.

    All you have to do is, you need to create a formatted CDT for this purpose or you may need to create a label-value pair as mentioned in SAIL recipes by Appian.

    Please do let us know if you have any follow-up questions.
  • Hi #rishi .. I am trying to export my task report using the same plugin and I am constantly getting the 500 error. I have used this plugin earlier in other tempo reports and it was working fine over there. Only difference here is my source is getPortalReportDataSubset due to which I am getting the result in PortalReportDataSubset format. So I am looping through this result, converting it into a simple CDT structure, then doing a todatasubset() and finally passing the resultant object into the plugin function. I have printed and checked the resultant data in UI. Everything is coming fine. Even the rule when tested individually (by hard coding values in JSON string) gives the correct result (PFA). But when called from parent rule I am getting this issue.

    I compared my other code and everything looks perfect. If you could share a screenshot of your code here it would be of great help.