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
Discussion posts and replies are publicly visible
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.
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.
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?
Hi Stewart,
It doesn't say.From the examples and screenshots, I can tell that the date was 2016.
That would suggest a version of 16.x at the latest, which would also suggest something has changed in Appian. If you would be so kind as to provide some official feedback on this (it's effectively a defect in the Learning Path documentation) then Appian can make a fix to that documentation. Thanks.
sure, I will give feedback.