Skip to main content
January 11, 2021
Question

Converting PortalReportDataSubset to JSON is not supported

  • January 11, 2021
  • 6 replies
  • 0 views

Hello community members,

I am working on an assignment in a Appian learning path: Skills Practice Solution: Appian as a Service.
A part of the assignment is calling a report from the webapi.

code:

a!localVariables(
local!query: a!queryProcessAnalytics(
report: cons!COLOUR_REPORT,
contextProcessModels: cons!COLOUR_PROCESS_MODEL
),
a!toJson(local!query)

a!toJson(local!query) is used in the body.

But I get error Converting PortalReportDataSubset to JSON is not supported.

It works fine with local!query.data

Has this something to do with the Appian version I am using (19.4) because I followed the directions in the assignment.

Kind Regards,

Erik

    6 replies

    stewart.burchell
    January 11, 2021

    Hi Erik

    You cannot cast the entire datasubset to a JSON structure, but you can cast the 'data' within the generated datasubset to JSON:

    a!toJson(local!query.data)

    Out of curiosity, why do you want the content of a Process Report datasubset in JSON format? What is generated isn't very meaningful outside of the Appian environment.

    erikb0001Author
    January 11, 2021

    Hi Steward,

    Thanks for you quick response.
    It has no further meaning for me to get the extra info. It is just that I followed the instructions in the tutorial but got an error.

    As you can see it screenshot, the code seems to work fine in the example.

    So I wondered if it had something to do with the Appian Version.

    Kind Regards,

    Erik

    stewart.burchell
    January 11, 2021

    Hi Erik -h'm, it definitely doesn't work in the 20.4 environment I tested this in, and if you're saying it doesn't work in a 19.4 I wonder if something had changed before or at the 19.4 release. Does the tutorial mention anywhere what version of Appian is required as a pre-requisite?