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

 

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,190)