
Announcements
Hello All,
I am working on survey canvas app with Dataverse as Datasource and need some help with it.
I want create something like admin will be able to define the template of the survey with some properties like id title and sections and then section will have id order description. And when survey is created i want to store the data properties as a json
stored as JSON below is an example of the a data JSON object
[
{ "Answer": "", "Description": "Please provide the background", "Id": 1, "Order": 1, "Title": "Background", "Type": "Freetext" }
,
How to do this with canvas app, is it doable?
Yes, you can do this with a canvas app. I assume you will have a table of answer records, so this example shows them stored in a local collection:
Collect(colAnswers,
{
Answer: "",
Description: "Please provide the background",
Id: 1,
Order: 1,
Title: "Background",
Type: "Freetext"
})
Then you can form a JSON object out of the collection with a statement like:
UpdateContext({ varJSON:
JSON({
Answers: colAnswers
})
})
Hope that helps,
Bryan