web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Including Line Items f...
Power Apps
Unanswered

Including Line Items from Canvas app in and Email

(0) ShareShare
ReportReport
Posted on by 87

Hello All,

 

No Idea how to accomplish what I am wanting to do, so I am hoping for some guidance or reference to an example.

 

I have built a Canvas App that creates and Order.   The order is comprised of a header and line items.  When the order is submitted, an email is sent.  In the email I can easily include information from the header, but I would like to also include a list of the items on the order.  There is a relationship between the order header and the order line items.

 

Not sure how to go about doing this.  

Thoughts?  Thanks!

 

Categories:
I have the same question (0)
  • rpersad Profile Picture
    831 on at

    If you want to retrieve the data you can use the LastSubmit function to retrieve the last row that was submitted to your data source and store it into a variable. Example:

    Set(var, 'DataSource Name'.LastSubmit)

    Then in the email body just reference back the variable and the column that you want to send in your email. NOTE: You must ensure that the value is a text.

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @SwMatchUS,

    Generally, Form.LastSubmit works for only the current session of the app, however it only works for an edit form.

    However, it is still a correct direction.

     

    If you exit the app and next time you enter the app, the Form.LastSubmit won't work if you don't submit a form.

    Based on your previous operation, you could include info from the header and there is relationship between header and other order info, you could use the LookUp() function:

    LookUp(list,Header=xxx).OrderInfo

     

    If all this happened in the same session,  you could directly refer each field of your submitted item:

    FormName.LastSubmit.FieldName

     

  • SwedUSCrm Profile Picture
    87 on at

    Hi @rpersad 

     

    You mention the last row submitted.  The order would have multiple lines, so I would want to retrieve all lines related to the header and list in the email.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 846

#2
Valantis Profile Picture

Valantis 532

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard