cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gary919
Frequent Visitor

Convert signle recrod into an arrary with Power Automate thanks,

 

Hello Comrades

 

I use MS form to collect training needs and store feedback to SharePoint list, this list contains 100 columns, most of the columns are training courses and the value are either "Completed" or "Need more training".
A flow will send a notification to me after 3 months since they submitted the form, the notification contains training course names if the value is "need more training",
I have finished flow to store feedback to SharePoint list, the challenge I am facing is
"How to filter all course name of "need more training "and put this list into the notification email"
My initial idea is to covert a single Sharepoint item into the array, and filter the array by "need more training", then put the filtered result into the notification email.
But I have no idea about the covert single item to an array with Power Automate,
If you have any suggestion or better method please share with me.

Thanks for your time : )

2 REPLIES 2
ArchitectMadhan
Super User
Super User

 Hi @Gary919 ,

In your scenario, you have to follow below steps in Power Automate Flow (Schedule/Manual Flow). You do not need to convert single item to array.

 

1. Use "SharePoint - Get Items" and configure the Site URL, Listname (Training Courses) and Filter Query for : value is "need more training".

2. Use condition "Apply for each" to look thru each training course, construct HTML table using the row values.

3. Once the loop run successfully for all the items, you will have the HTML table with all the Training courses.

4. Add the HTML Table in the "Send Email" action.

https://powerusers.microsoft.com/t5/Building-Flows/Get-Items-from-SharePoint-list-compose-email-body...

The above link has the steps to construct the HTML table and compose the email body.

 

If you find my solution helpful for resolving the issue, then please consider giving thumbs up and Accept it as the solution to help the other members find it more quickly.

- Architect Madhan

Please click the "Accept as Solution" button and give thumbs up, if it is helpful to you.
Gary919
Frequent Visitor

@ArchitectMadhan 

Thanks for your help, let me have a clarification 

 

As below picture, I have 100 courses (100 columns). each course has value either " need further training" or "Competent". 

 

For example, after Chris submitted form, the flow should check value of each course , and  send an email to me as 

 

"Hello

Chris needs more training to below course

Course -2

Course - 100"  

 

it is not necessary to check each people once a time, but we need flow to check each course for individual. 

That will be a nightmare to wirte 100 if/else, so I am wondering if the flow can check all columns without writing conditional for each course. 

 

Thanks, 

 

screen_flow.jpg

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!

Users online (5,307)