cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chiders
Frequent Visitor

For Each Row in JSON Aray create Share point Item

I'm to extract the data from a Aray, and cycle through each row.

 

However my current set up retuns blank from each Item.

 

I've tried "for each, create variable" however this just returned Null's

 

 

Chiders_0-1627245215514.png

 

 

 

JSON Output example:

{
    "body": [
        {
            "Spread""3",
            "Logger ID""2742003651",
            "Adress""53 fewcett lane, leeds ls124pg",
            "Logger Status""Leak",
            "Leak Date""30/06/2021",
            "Reason For Alarm""Job(s) raised",
            "Correlated?""Yes",
            "Sounded?""Yes",
            "Comments""1",
            "Order""Morec",
            "DMA""G077 COTTINGLEY",
            "Date""23/07",
            "Level""31"
        },
        {
            "Spread""6",
            "Logger ID""10042010333",
            "Adress""20 Windmill Ct, Leeds LS12 4WB, UK",
            "Logger Status""Leak",
            "Leak Date""19/06/2021",
            "Reason For Alarm""Job(s) raised",
            "Correlated?""Yes",
            "Sounded?""Yes",
            "Comments""1",
            "Order""Morec",
            "DMA""G077 COTTINGLEY",
            "Date""23/07",
            "Level""29"
        },
 
 
Share Point:
Chiders_0-1627245562160.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Chiders :

I've made a test but it worked well on my side:

My List:

vbofengmsft_0-1627267668353.png

My Flow:

vbofengmsft_2-1627267740190.png

vbofengmsft_3-1627267751534.png

Content:

{
    "body": [
        {
            "Spread": "3",
            "Logger ID": "2742003651",
            "Adress": "53 fewcett lane, leeds ls124pg",
            "Logger Status": "Leak",
            "Leak Date": "30/06/2021",
            "Reason For Alarm": "Job(s) raised",
            "Correlated?": "Yes",
            "Sounded?": "Yes",
            "Comments": "1",
            "Order": "Morec",
            "DMA": "G077 COTTINGLEY",
            "Date": "23/07",
            "Level": "31"
        },
        {
            "Spread": "6",
            "Logger ID": "10042010333",
            "Adress": "20 Windmill Ct, Leeds LS12 4WB, UK",
            "Logger Status": "Leak",
            "Leak Date": "19/06/2021",
            "Reason For Alarm": "Job(s) raised",
            "Correlated?": "Yes",
            "Sounded?": "Yes",
            "Comments": "1",
            "Order": "Morec",
            "DMA": "G077 COTTINGLEY",
            "Date": "23/07",
            "Level": "29"
        }]
}

Schema:

{
    "type": "object",
    "properties": {
        "body": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "Spread": {
                        "type": "string"
                    },
                    "Logger ID": {
                        "type": "string"
                    },
                    "Adress": {
                        "type": "string"
                    },
                    "Logger Status": {
                        "type": "string"
                    },
                    "Leak Date": {
                        "type": "string"
                    },
                    "Reason For Alarm": {
                        "type": "string"
                    },
                    "Correlated?": {
                        "type": "string"
                    },
                    "Sounded?": {
                        "type": "string"
                    },
                    "Comments": {
                        "type": "string"
                    },
                    "Order": {
                        "type": "string"
                    },
                    "DMA": {
                        "type": "string"
                    },
                    "Date": {
                        "type": "string"
                    },
                    "Level": {
                        "type": "string"
                    }
                },
                "required": [
                    "Spread",
                    "Logger ID",
                    "Adress",
                    "Logger Status",
                    "Leak Date",
                    "Reason For Alarm",
                    "Correlated?",
                    "Sounded?",
                    "Comments",
                    "Order",
                    "DMA",
                    "Date",
                    "Level"
                ]
            }
        }
    }
}

The Result:

vbofengmsft_1-1627267719383.png

  • I noticed that you may have more than one Parse JSON action, please make sure that the Body of Apply to each 3 is correct
  • Please check the Schema or check the data structure of the SP list

Best Regards,

Bof

 

View solution in original post

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @Chiders :

I've made a test but it worked well on my side:

My List:

vbofengmsft_0-1627267668353.png

My Flow:

vbofengmsft_2-1627267740190.png

vbofengmsft_3-1627267751534.png

Content:

{
    "body": [
        {
            "Spread": "3",
            "Logger ID": "2742003651",
            "Adress": "53 fewcett lane, leeds ls124pg",
            "Logger Status": "Leak",
            "Leak Date": "30/06/2021",
            "Reason For Alarm": "Job(s) raised",
            "Correlated?": "Yes",
            "Sounded?": "Yes",
            "Comments": "1",
            "Order": "Morec",
            "DMA": "G077 COTTINGLEY",
            "Date": "23/07",
            "Level": "31"
        },
        {
            "Spread": "6",
            "Logger ID": "10042010333",
            "Adress": "20 Windmill Ct, Leeds LS12 4WB, UK",
            "Logger Status": "Leak",
            "Leak Date": "19/06/2021",
            "Reason For Alarm": "Job(s) raised",
            "Correlated?": "Yes",
            "Sounded?": "Yes",
            "Comments": "1",
            "Order": "Morec",
            "DMA": "G077 COTTINGLEY",
            "Date": "23/07",
            "Level": "29"
        }]
}

Schema:

{
    "type": "object",
    "properties": {
        "body": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "Spread": {
                        "type": "string"
                    },
                    "Logger ID": {
                        "type": "string"
                    },
                    "Adress": {
                        "type": "string"
                    },
                    "Logger Status": {
                        "type": "string"
                    },
                    "Leak Date": {
                        "type": "string"
                    },
                    "Reason For Alarm": {
                        "type": "string"
                    },
                    "Correlated?": {
                        "type": "string"
                    },
                    "Sounded?": {
                        "type": "string"
                    },
                    "Comments": {
                        "type": "string"
                    },
                    "Order": {
                        "type": "string"
                    },
                    "DMA": {
                        "type": "string"
                    },
                    "Date": {
                        "type": "string"
                    },
                    "Level": {
                        "type": "string"
                    }
                },
                "required": [
                    "Spread",
                    "Logger ID",
                    "Adress",
                    "Logger Status",
                    "Leak Date",
                    "Reason For Alarm",
                    "Correlated?",
                    "Sounded?",
                    "Comments",
                    "Order",
                    "DMA",
                    "Date",
                    "Level"
                ]
            }
        }
    }
}

The Result:

vbofengmsft_1-1627267719383.png

  • I noticed that you may have more than one Parse JSON action, please make sure that the Body of Apply to each 3 is correct
  • Please check the Schema or check the data structure of the SP list

Best Regards,

Bof

 

Helpful resources

Announcements
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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (4,609)