cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Radar
Regular Visitor

ExpressionEvaluationFailed. The result of the evaluation of the foreach expression is of type String. The result must be a valid array.

The aim of this flow is to create a page (with the anme of the created task as title) in a onenote section (with the bucket name the task was created in).

FlowFlow

 

But after the test this error information was displayed:

error informationerror information

 How do i use a array in this context correctly?

Thanks for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @Radar,

 

The error suggests that your are using a field which of type string in the input of your auf alle anwenden (apply to each) action. This action requires you to use an array as input instead of the id you are using.

 

However, you could probably approach this a bit differently and avoid the apply to each actions all together. You can do that by using two filter arrays for the matching of the bucket and the correct onenote section.

 

Below is an example of that approach.

This example doesn't include checks to see if there are any existing buckets or sections. So, you still might want to add these to the example.

 

1. Add the first filter array. This one is to retrieve the correct bucket and its name from the Lists buckets array.

 

2. Add the second filter array. This action is to find if there is an existing section already in the notebook.

 

And for the creation of the page it looks like you should be using the pagesurl property of the Get Sections action output in the Notebook section field.

 

twofilterarrays.png

 

 

 

View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @Radar,

 

The error suggests that your are using a field which of type string in the input of your auf alle anwenden (apply to each) action. This action requires you to use an array as input instead of the id you are using.

 

However, you could probably approach this a bit differently and avoid the apply to each actions all together. You can do that by using two filter arrays for the matching of the bucket and the correct onenote section.

 

Below is an example of that approach.

This example doesn't include checks to see if there are any existing buckets or sections. So, you still might want to add these to the example.

 

1. Add the first filter array. This one is to retrieve the correct bucket and its name from the Lists buckets array.

 

2. Add the second filter array. This action is to find if there is an existing section already in the notebook.

 

And for the creation of the page it looks like you should be using the pagesurl property of the Get Sections action output in the Notebook section field.

 

twofilterarrays.png

 

 

 

Works like a charm. Thanks so much!

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,631)