cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mhorzum
Helper III
Helper III

Compare 2 Sharepoint List Column and Send Email

Hi

In my sharepoint list

I have to use "Created by Displayname" for my List A.
I ll use also "Names" column for List B.

 

We ll compare the names in these columns. 

List B: Names list only..

A

B

C

D

E

F

List A: records list.

A

A

C

C

D
E
E

 

We ll compare two column and we ll find B and F doesnt do any entry/record.

My flow ll send an email to me like this:


Dear Jack
This month, these persons didnt record any entry.

B

F

15 REPLIES 15
Amit_Sharma
Super User
Super User

Hi @mhorzum,

I have Created Sample for You.

1. Use Get Item Action For get List From list A.

Amit_Sharma_0-1671204518635.png

 

2. Use Get Item Action For get List From list B.

Amit_Sharma_1-1671204574734.png

3. Initialize one string variable.

Amit_Sharma_2-1671204625528.png

 

4. Use Apply to each Action

Amit_Sharma_3-1671204684109.png

5.Use Filter Array

Amit_Sharma_4-1671204777964.pngAmit_Sharma_5-1671204841221.png

 

6. Check Condition

Amit_Sharma_6-1671204882313.pngAmit_Sharma_7-1671204905779.png

 

7. If Condition is true

Amit_Sharma_8-1671204994529.pngAmit_Sharma_9-1671205026828.png

 

8. use One Compose Action For get variable Values.

 

Amit_Sharma_10-1671205092545.png

 

9. After That Send The mail

 

 

Amit_Sharma_12-1671205174747.png

Amit_Sharma_13-1671205221744.png

 

Complete Flow

 

Amit_Sharma_14-1671205343560.pngAmit_Sharma_15-1671205371335.pngAmit_Sharma_16-1671205403340.png

 


-------------------------------------------------------------------------
If I have answered your question, please mark post as Solved.
If you like my response, please give it a Thumbs Up.

 

 

 

mhorzum
Helper III
Helper III

1.png2.png3.png4.png

 

I tried your advice and that worked to occur html list with list variables. I tried lots of time. crashed

Amit_Sharma
Super User
Super User

Hi @mhorzum, please confirm output of variable is valid array before it is passed to Create HTML table action. Feel free to share input passed to the action where error happened.

mhorzum
Helper III
Helper III

Hi @Amit_Sharma 

t1.png

Now, it works without an error. But it listed only 1 name. That name is the first name of the in List B=trainers.
I think it worked only for 1 loop. 

Amit_Sharma
Super User
Super User

Hi @mhorzum,

If you Want to create Html Table, Please Make Some Modification in Flow as shown below.

 

1. Use one more Select Action After List b and provide value that return by list B.

Amit_Sharma_0-1671255279735.png

 

- After This Select Columns As your Need from List B.

Amit_Sharma_1-1671255511429.png

 

 

2. Select Array in initialize variable Action.

Amit_Sharma_2-1671255622043.png

 

3. After that Change Apply to each Action body that return by Select B Action.

Amit_Sharma_3-1671255833761.png

 

4. Filter array Action.

Amit_Sharma_4-1671256078975.png

Amit_Sharma_5-1671256276711.png

items('Apply_to_each')?['Name']

 

5. In Condition Action.

Amit_Sharma_6-1671256375077.png

empty(body('Filter_array'))

Amit_Sharma_7-1671256433677.png

 

6. Change Append to string variable Action and Use Append to array variable Action and provide current item in value field.

Amit_Sharma_8-1671256669653.png

 

7. After this Outside the apply to each action use one Compose Action and get variable value.

Amit_Sharma_9-1671256872120.png

 

 8. After Use Create Html Table Action and provide value.

Amit_Sharma_10-1671256986103.png

json(string(outputs('Get_All_Person_From_Variable')))

 

9. Then Use Send an email (v2) Action And provide Output of Create Html Table Action.

Amit_Sharma_12-1671257217056.png

 

Complete Flow

 

Amit_Sharma_13-1671257284965.pngAmit_Sharma_14-1671257347227.png

Amit_Sharma_15-1671257388208.png

 

After Doing this It's Work Perfectly.

 

Best Regards.

 

 

mhorzum
Helper III
Helper III

hİ @Amit_Sharma 

Thanks for last answer but pls see previous message: I added again below. That worked but:

 

Now, it works without an error. But it listed only 1 name.

That name is the first name of the in List B=trainers.
I think it worked only for 1 loop. 

 

mhorzum_0-1671269298861.png

 

Now, it works without an error. But it listed only 1 name. That name is the first name of the in List B=trainers.
I think it worked only for 1 loop. 

Pls work on the first flow. I dont have to create an html table. İ tryed on the first flow diagram, that worked now but the problem it gives only 1 result. 

it listed only 1 name. That name is the first name of the in List B=trainers.
I think it worked only for 1 loop. 

11.png

Amit_Sharma
Super User
Super User

Hi @mhorzum,

This Is Return Only one value Because You are getting variable value Inside Appy to each Action If the Last Compose Action use Outside the apply to each Action, then it's work perfectly.

 

Amit_Sharma_0-1671273778492.png

 

mhorzum
Helper III
Helper III

Hi @Amit_Sharma 

That's worked. Nice. Can we add a timing filter for list A.

ı wanna use only last months data.

This flow will work every months 5th day.

 Example: For 5 Jan -> I wanna filter List A -> 1 Dec - 5 Jan.

Amit_Sharma
Super User
Super User

Hi @mhorzum ,

You can Add Filter Query in Get items From List A where you are getting list A.

Amit_Sharma_0-1671341063789.pngAmit_Sharma_1-1671341093768.pngAmit_Sharma_2-1671341127087.png

 

addHours(utcNow(),-24)

 

Amit_Sharma_3-1671341190770.png

 

 

After doing this you are getting only Those items from List A Which Created Date Time Not older from 1 month.

 

Best Regards,

mhorzum
Helper III
Helper III

Hi @Amit_Sharma 

Thanks for your answer. I wanna ask you 

addHours(utcNow(),-24)
We ll add only -24 hours, it is one day.
 
My flow will work 5th day of every month. Example:
5 Jan
5 Feb
5 Mar
5 Apr
 
I need time limit between last month
5 Jan (1 Dec - 5 Jan)
5 Feb (1 Jan- 5 Feb)
5 Mar (1 Feb- 5 Mar)
5 Apr (1 Mar - 5 Apr)
 
I ll use the "created" date value in my list A.
Actually we can use the "Created gt (first day of previous month) like this
Thank You
Amit_Sharma
Super User
Super User

Hi @mhorzum,

Sorry For That I was used this Expression Just for testing.

Please use Below expression place of addHours(utcNow(),-24)

addDays(utcNow(),-30)

 

Best Regards.

Amit_Sharma
Super User
Super User

Hi @mhorzum,

This Expression Work Perfectly As your Requirement This return first date of last month when your flow is run 5th day of every month.

You can Check as well in Compose Action.

 

startOfMonth(addDays(utcNow(),-20))

 

Currently I am subtracting -20 Because I am checking it today it is also work perfectly for your requirement because your flow run 5 th day of every month.

 

 

mhorzum
Helper III
Helper III

Hi @Amit_Sharma 

Now date limitation is ok. Last thing only:

112.png

After i tested my flow, Names recorded like image, a list format.

But, i m checking my mail box and mail format is like below.

How can we take list format in mail.

 

In mail

Aşağıdaki eğitmenlerimiz Nov ayı kayıtlarını yapmadılar.
Ali  Ali  Burak  Ferhat  Hakan  Kemal  Kubilay 

 

I wanna list format:

Aşağıdaki eğitmenlerimiz Nov ayı kayıtlarını yapmadılar.
Ali 

Ali 

Burak 

Ferhat 

Hakan 

Kemal 

Kubilay 

 

 

 

Amit_Sharma
Super User
Super User

Hi @mhorzum ,

You have to Create Html for it I already which told you in my above reply for Modification your existing flow. Please follow that part to achieving it.

 

Best Regards.

Helpful resources

Announcements

Celebrating the May Super User of the Month: Laurens Martens

  @LaurensM  is an exceptional contributor to the Power Platform Community. Super Users like Laurens inspire others through their example, encouragement, and active participation. We are excited to celebrated Laurens as our Super User of the Month for May 2024.   Consistent Engagement:  He consistently engages with the community by answering forum questions, sharing insights, and providing solutions. Laurens dedication helps other users find answers and overcome challenges.   Community Expertise: As a Super User, Laurens plays a crucial role in maintaining a knowledge sharing environment. Always ensuring a positive experience for everyone.   Leadership: He shares valuable insights on community growth, engagement, and future trends. Their contributions help shape the Power Platform Community.   Congratulations, Laurens Martens, for your outstanding work! Keep inspiring others and making a difference in the community!   Keep up the fantastic work!        

Check out the Copilot Studio Cookbook today!

We are excited to announce our new Copilot Cookbook Gallery in the Copilot Studio Community. We can't wait for you to share your expertise and your experience!    Join us for an amazing opportunity where you'll be one of the first to contribute to the Copilot Cookbook—your ultimate guide to mastering Microsoft Copilot. Whether you're seeking inspiration or grappling with a challenge while crafting apps, you probably already know that Copilot Cookbook is your reliable assistant, offering a wealth of tips and tricks at your fingertips--and we want you to add your expertise. What can you "cook" up?   Click this link to get started: https://aka.ms/CS_Copilot_Cookbook_Gallery   Don't miss out on this exclusive opportunity to be one of the first in the Community to share your app creation journey with Copilot. We'll be announcing a Cookbook Challenge very soon and want to make sure you one of the first "cooks" in the kitchen.   Don't miss your moment--start submitting in the Copilot Cookbook Gallery today!     Thank you,  Engagement Team

Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!    

Welcome to the Power Automate Community

You are now a part of a fast-growing vibrant group of peers and industry experts who are here to network, share knowledge, and even have a little fun.   Now that you are a member, you can enjoy the following resources:   Welcome to the Community   News & Announcements: The is your place to get all the latest news around community events and announcements. This is where we share with the community what is going on and how to participate.  Be sure to subscribe to this board and not miss an announcement.   Get Help with Power Automate Forums: If you're looking for support with any part of Power Automate, our forums are the place to go. From General Power Automate forums to Using Connectors, Building Flows and Using Flows.  You will find thousands of technical professionals, and Super Users with years of experience who are ready and eager to answer your questions. You now have the ability to post, reply and give "kudos" on the Power Automate community forums. Make sure you conduct a quick search before creating a new post because your question may have already been asked and answered. Galleries: The galleries are full of content and can assist you with information on creating a flow in our Webinars and Video Gallery, and the ability to share the flows you have created in the Power Automate Cookbook.  Stay connected with the Community Connections & How-To Videos from the Microsoft Community Team. Check out the awesome content being shared there today.   Power Automate Community Blog: Over the years, more than 700 Power Automate Community Blog articles have been written and published by our thriving community. Our community members have learned some excellent tips and have keen insights on the future of process automation. In the Power Automate Community Blog, you can read the latest Power Automate-related posts from our community blog authors around the world. Let us know if you'd like to become an author and contribute your own writing — everything Power Automate-related is welcome.   Community Support: Check out and learn more about Using the Community for tips & tricks. Let us know in the Community Feedback  board if you have any questions or comments about your community experience. Again, we are so excited to welcome you to the Microsoft Power Automate community family. Whether you are brand new to the world of process automation or you are a seasoned Power Automate veteran - our goal is to shape the community to be your 'go to' for support, networking, education, inspiration and encouragement as we enjoy this adventure together.     Power Automate Community Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Tuesday Tip | How to Report Spam in Our Community

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: How to Report Spam in Our Community We strive to maintain a professional and helpful community, and part of that effort involves keeping our platform free of spam. If you encounter a post that you believe is spam, please follow these steps to report it: Locate the Post: Find the post in question within the community.Kebab Menu: Click on the "Kebab" menu | 3 Dots, on the top right of the post.Report Inappropriate Content: Select "Report Inappropriate Content" from the menu.Submit Report: Fill out any necessary details on the form and submit your report.   Our community team will review the report and take appropriate action to ensure our community remains a valuable resource for everyone.   Thank you for helping us keep the community clean and useful!

Users online (4,205)