Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

OnSubmit Collect SharePoint ID and email a link to open the specific item in SharePoint

(1) ShareShare
ReportReport
Posted on by

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! 

  • Dave-ITMan Profile Picture
    on at
    Re: OnSubmit Collect SharePoint ID and email a link to open the specific item in SharePoint

    Hi @cha_cha 

     

    Changing it from DataCardValue to Form1.LastSubmit.Field worked, thank you so much!

     

    Regards

  • Verified answer
    cha_cha Profile Picture
    4,909 Super User 2025 Season 1 on at
    Re: OnSubmit Collect SharePoint ID and email a link to open the specific item in SharePoint

    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.

     

    cha_cha_0-1669044023619.png

     

  • Dave-ITMan Profile Picture
    on at
    Re: OnSubmit Collect SharePoint ID and email a link to open the specific item in SharePoint

    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)

     

  • cha_cha Profile Picture
    4,909 Super User 2025 Season 1 on at
    Re: OnSubmit Collect SharePoint ID and email a link to open the specific item in SharePoint

    Hello @Dave-ITMan 

     

    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

     

  • Dave-ITMan Profile Picture
    on at
    Re: OnSubmit Collect SharePoint ID and email a link to open the specific item in SharePoint

    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

  • cha_cha Profile Picture
    4,909 Super User 2025 Season 1 on at
    Re: OnSubmit Collect SharePoint ID and email a link to open the specific item in SharePoint

    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.

     

    cha_cha_0-1669031994424.png

     

     

    I made a short demo here. Hope it plays soon.

    https://youtu.be/Y6xxfkUC5DA

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.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,552 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard