cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Medoomi
Helper V
Helper V

Is it possible to parse paragraph marks from a multi-line datacard (when sending to Flow)?

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Medoomi
Helper V
Helper V

Hi @StalinPonnusamy 

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!

View solution in original post

5 REPLIES 5
StalinPonnusamy
Super User
Super User

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.

 

 

StalinPonnusamy_0-1643319271537.png

 

  • Add Parse JSON action
  • Click "Generate from Sample" for schema and provide the below sample
    {
        "State": "Minneapolis",
        "Zip": 55445,
        "ScopeOfWork": "My Scope"
    }

 

StalinPonnusamy_1-1643319461153.png

 


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.

 

  • Can you Hardcord the value from PowerApps and sent it to Flow to test the flow piece working or not.?
  • Is the Collection is an array from PowerApps to flow?

 

 

StalinPonnusamy
Super User
Super User

Hi @Medoomi 

 

Can you try substituting the values and see data are passing through like

Substitute(DataCardValue90.Text,Char(10),"<br/>")

 

Medoomi
Helper V
Helper V

Hi @StalinPonnusamy 

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!

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (4,337)