cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bold
New Member

Having issue on Flow

Hello guys,

 

I have a question. I'm trying to do this https://www.netwoven.com/2020/11/03/set-item-level-permission-in-sharepoint-list-using-power-automat... but I facing some errors on step5

ExpressionEvaluationFailed. The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@body('Parse_JSON_2')?['properties']?['d']?['properties']?['Last']?['properties']?['results']' is of type 'Null'. The result must be a valid array.

 

Do you have any suggestions. Sorry I'm newbie.

 

Many Thanks

4 REPLIES 4
abm
Super User
Super User

Hi @Bold 

 

Check your flow run history and see what its returned. Looks like you have got no results for body('Parse_JSON_2')?['properties']?['d']?['properties']?['Last']?['properties']?['results']



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hi abm!

Thank you for your reply.

1st of all I'm not really sure that I parsed JSON correctly.

2nd I checked the raw outputs and seeing this

{
    "body": {
        "d": {
            "__metadata": {
                "id""e4edb600-3d7a-4016-b4ce-69ebb81a55e0",
                "etag""\"1\"",
                "type""SP.Data.Risk_x0020_ManagementListItem"
            },
            "Last": {
                "__metadata": {
                    "id""4cd605da-b9d5-4b50-b7b6-344ce0d4bbfd",
                    "type""SP.Data.UserInfoItem"
                },
                "Id"6
            }
        }
    }
}

Hi @Bold 

 

Copy the above JSON Data and generate the Parse JSON Schema. Let me know how it goes?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hello Abm,

{
    "type""object",
    "properties": {
        "body": {
            "type""object",
            "properties": {
                "d": {
                    "type""object",
                    "properties": {
                        "__metadata": {
                            "type""object",
                            "properties": {
                                "id": {
                                    "type""string"
                                },
                                "uri": {
                                    "type""string"
                                },
                                "etag": {
                                    "type""string"
                                },
                                "type": {
                                    "type""string"
                                }
                            }
                        },
                        "Last": {
                            "type""object",
                            "properties": {
                                "__metadata": {
                                    "type""object",
                                    "properties": {
                                        "id": {
                                            "type""string"
                                        },
                                        "type": {
                                            "type""string"
                                        }
                                    }
                                },
                                "Id": {
                                    "type""integer"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
This is the result

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,494)