Error on power app in Apply Each when customizing a SharePoint online form

Sherazad Ahmed 411 Reputation points
2025-03-14T18:56:00.29+00:00

Hello,

I have a field on my powerapp form which is a choice field called Approved. However, I am receiving the following error on my flow when checking the value on the field.

The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body/Approved']' is of type 'Object'. The result must be a valid array.

Does anyone know how to fix this?

thanks,

SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
662 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 51,781 Reputation points Microsoft External Staff
    2025-03-21T09:15:38.2633333+00:00

    I'm glad to hear you solve the problem, if you have any issue about SharePoint, you are welcome to raise a ticket in this forum.

    By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others.". So, I would make a brief summary of this thread.

    You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community members to see the useful information when reading this thread. Thanks for your understanding!

    [Error on power app in Apply Each when customizing a SharePoint online form]

    Issue Symptom:

    OP have a field on the PowerApps form which is a choice field called Approved. However, receiving the following error on the flow when checking the value on the field.

    The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body/Approved']' is of type 'Object'. The result must be a valid array.

    Current status:

    OP solved this. Through initializing a variable as an array and putting the value of Approved in there.

    ArrayVariable


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.