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

Array problem using "When a new event is created"

My flow without a loop works if a single new event is created in a controlled environment.  If multiple new events are created it seems to get confused and launch repeatedly.  I tried inserting a loop, but I continue to get array errors regardless of the output I used for the Apply Each.

 

Array Error:

JFGriff_0-1619698860234.png

 

Basic workflow and I have tried different fields for the "Select an output from Previous step", but still get an array error:

 

JFGriff_1-1619698915485.png

How do I get my workflow logic to loop through each new event?

 

Thank you!

9 REPLIES 9
jinivthakkar
Resident Rockstar
Resident Rockstar

@JFGriff sorry but I don't understand what are you trying to do here ?

JFGriff
Regular Visitor

Thank you.  I want to loop through the array of events returned by "Get new Event".

 

My problem is, I continue to get array errors on my Apply to Each. I have tried various ID fields from the Get New Event.  I can't find a field to use that will allow me to loop through the array of events returned from Get new event.

jinivthakkar
Resident Rockstar
Resident Rockstar

@JFGriff I tried the steps you said and this is how my flow looks, not sure why you have a for each loop

jinivthakkar_0-1619704145961.png

Please can you post screenshot of your entire flow ?

 

JFGriff
Regular Visitor

JFGriff_0-1619708748134.png

 

jinivthakkar
Resident Rockstar
Resident Rockstar

@JFGriff you are bound to get error as the action when an event is created is going to give you only 1 result which is of type string whereas for for each loop you need an array.

 

Your flow should be like this:

jinivthakkar_0-1619712809222.png

jinivthakkar_1-1619712855963.png

You can add exact conditions and actions, this is just for reference.

 

Try if this works for you.

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

jinivthakkar
Resident Rockstar
Resident Rockstar

@JFGriff I also tried this, see if this helps

jinivthakkar_2-1619713507471.png

jinivthakkar_3-1619713539560.png

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

 

This works if there is a single new event.   If I create two new events before the Flow runs, it causes a problem.  That is why I was trying to loop.   I thought "When a New Event is created" potentially returned ALL new events.  It gives a the option for Top Count and Skip count -- so it appears as though it would return more than 1 event.

I guess I need to filter "Get Event" because that pulled every event that every event in the calendar.  

@JFGriff yeah that's what I am trying to tell you and my previous reply also has how it can be done. 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,303)