Notifications
Announcements
Hi Experts,
I have an app with an Edit Form that sends the information to a SharePoint list. The form has multiple Yes/No toggles and what i'm wanting to achieve is that if any of the toggles in form1 have a No answer then OnSubmit of the form, it emails someone to say which ones were set to No and also send a direct link to the item in the sharepoint list, not just the AllItems sharepoint page but the specific item in the list?
Thanks in advance!
Hello @Dave-ITMan
Use the LastSubmit function on the form so you can get the data of the most recent submission of a Form Control.
I made a short demo here. Hope it plays soon.
https://youtu.be/Y6xxfkUC5DA
Hi @cha_cha ,
Thank you for this, that has given me the link but how do I get that into an email so that it sends the unique link every time? Then after that, I need to know how it will only send the email if any (1, 2, 3, or all of the 15 toggles) have a No setting set? Many thanks
The LastSubmit can retrieve all the prior info that was recently submitted.
LastSubmit Examples:
https://www.spguides.com/powerapps-lastsubmit/
https://www.youtube.com/watch?v=N8DWvS7P9lw&ab_channel=ShaneYoung
As for email, you can utilize Outlook365 to send information. You can combine LastSubmit and Outlook plugin.
Demo for Sending Emails:
https://www.youtube.com/watch?v=GoF3vfP3YTM&ab_channel=RezaDorrani
Hi @cha_cha
That doesn't exactly explain what i'm looking to achieve, I think i'm on the right track with the below but i'm not receiving the email when any amount of toggles are set to false, can you see what's wrong with the below please? This is the OnSuccess of Form1
If( (DataCardValue2.Value = false || DataCardValue3.Value = false || DataCardValue4.Value = false || DataCardValue5.Value = false || DataCardValue6.Value = false || DataCardValue7.Value = false || DataCardValue8.Value = false || DataCardValue9.Value = false || DataCardValue10.Value = false || DataCardValue11.Value = false || DataCardValue12.Value = false || DataCardValue13.Value = false || DataCardValue14.Value = false || DataCardValue15.Value = false || DataCardValue16.Value = false || DataCardValue17.Value = false || DataCardValue18.Value = false || DataCardValue19.Value = false || DataCardValue20.Value = false || DataCardValue21.Value = false), Office365Outlook.SendEmailV2("firstname.lastname@company.com" , "No Option Has Been Selected" , "Hi,<br><br> Some body information here<br><br> "&'LinkAddress'&"<br><br> ")); Navigate(Home)
Hi @Dave-ITMan
Can you share with me a screenshot of your form and a screenshot of the Sharepoint list? I just want to see first where you want to lead them. For the current code, the reason why it's not working is maybe that it's triggered on the OnSuccess property. The form is already emptied at this stage so it is returning a false value that's why the Email part is not running.
Changing it from DataCardValue to Form1.LastSubmit.Field worked, thank you so much!
Regards
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268