cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
anmdf
Level: Powered On

How to iterate through columns?

Hello!

 

I'm trying to build a flow:

1. Get items from Sharepoint list

2. Apply to each: Check if data is in one of the columns in the data list

3. Return column 1 row x value if data is found in the list

 

Here is how my Sharepoint looks like 

Capture.PNG

 

 

 

 

 

So, in apply to each, I made a condition that would check if my data is in January, or February, or March, etc. then return the value in the "Day" column if yes.

But condition can only accommodate up to 10 or's.

 

Is there a way/expression that would help me iterate each value through all of the columns?

 

Thank you!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: How to iterate through columns?

Hi @anmdf , 

 

There are a couple of ways you can do this:: 

 

1. Create groups in the condition: uduud.png

2. Use switch case: 

 

create 12 cases (1 for each month)monthswitc.png

 

Alternatively, you can create an array and add all the 12 months to that. In your apply to each condition for every row, add another apply to each where you have the array of months and iterate on the current item. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

1 REPLY 1
Super User
Super User

Re: How to iterate through columns?

Hi @anmdf , 

 

There are a couple of ways you can do this:: 

 

1. Create groups in the condition: uduud.png

2. Use switch case: 

 

create 12 cases (1 for each month)monthswitc.png

 

Alternatively, you can create an array and add all the 12 months to that. In your apply to each condition for every row, add another apply to each where you have the array of months and iterate on the current item. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 45 members 4,983 guests
Please welcome our newest community members: