I am collecting the content of a form, one of the fields of which is a multi-line Field (Dataverse) & using JSON format to integrate this with flow. eg. "ScopeOfWork" below:
ClearCollect(
colFormWithNotes,
{
State: DataCardValue88.Selected.Abbreviation,
Zip: DataCardValue42.Text,
ScopeOfWork: DataCardValue90.Text
}
);
FlowProjectDetails.Run(JSON(colFormWithNotes))
However, when I parse the content to JSON in Flow, the paragraph marks from "ScopeOfWork" are missing.
Is there a way to parse a multi-line datacard and retain the paragraph marks?
Solved! Go to Solution.
Thanks again for your reply. I should have checked before, but new lines apparently are parsed correctly (I can see them in the output in Flow). They are carried as /n...
Seeing as I was writing html, I simply introduced style="white-space: pre-line" to the paragraph, and the /n marks are read correctly.
Thank you so much for trouble-shooting!
Hi @Medoomi
I assume you collected data in PowerApps to the collection is fine. And you are sending the collection to Flow.
In the flow, when you parse the JSON content in the flow, you have to provide the Scheme which can be generated from the sample.
{
"State": "Minneapolis",
"Zip": 55445,
"ScopeOfWork": "My Scope"
}
Thanks,
Stalin - Learn To Illuminate
Thanks @StalinPonnusamy ,
in Flow, I had to adapt the schema to allow for null values, but apart from that, there's not much difference. My final schema is as follows:
{
"type": "array",
"items": {
"type": "object",
"properties": {
"ScopeOfWork": {
"type": [
"string",
"null"
]
},
"State": {
"type": [
"string",
"null"
]
},
"Zip": {
"type": [
"string",
"null"
]
}
},
"required": []
}
}
But still, the paragraph marks are not parsed.
Is this because I am using type: string for ScopeOfWork? i.e. should I be using array, or will this mess up the schema?
I believe ScopeOfWork is Multiline text which has NewLine and other special char that not parsing properly.
Hi @Medoomi
Can you try substituting the values and see data are passing through like
Substitute(DataCardValue90.Text,Char(10),"<br/>")
Thanks again for your reply. I should have checked before, but new lines apparently are parsed correctly (I can see them in the output in Flow). They are carried as /n...
Seeing as I was writing html, I simply introduced style="white-space: pre-line" to the paragraph, and the /n marks are read correctly.
Thank you so much for trouble-shooting!
User | Count |
---|---|
260 | |
110 | |
89 | |
52 | |
44 |