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 Automate News & Announcements

Power Automate News & Announcements

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

Community Calls Conversations

Community Calls Conversations

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

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,853)