cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Medoomi
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,847)