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
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (4,463)