Skip to main content
Community site session details

Community site session details

Session Id :

Invoice Management (Microsoft sample)

mblythe Profile Picture Posted by mblythe

 

invoice-management-screen.png

 

Description

Track total invoice amounts over different time periods. Create invoices with different line items, then email the invoice details to recipients.

 

Data connections

Common Data Service (Account, Sales invoice, and Sales invoice line entities). For more information about this data source, see The Common Data Service

 

Setup and usage info

To run and explore this app, open the Invoice Management template from web.powerapps.com. For more information, see Create and run an app from a template.

 

Author's helpful tips and formula lessons

There are quite a few screens in this app, but we'll focus on the first one for this discussion. Make sure you look at the formulas and what's going on in the other screens. The first screen (HomeScreen) combines a set of elements to build a useful and visually interesting experience:

 

> The drop-down menu filters the chart to a period of 1 week or 6 months; you could use it to filter other elements on the screen too.

 

> The screen prominently displays the total amount invoiced, using the following formula:

 

Text(Sum(SalesInvoiceGallery.AllItems,TotalAmount), "[$-en-US]$##,###.#")

 

The formula calculates the sum of all the invoices, then formats the result as US currency to display in a text label.

 

> The chart provides a quick view of invoices over time, using the following formula for the "Items" property.

 

If(Dropdown1.Selected.Value="6 months",Filter(SalesInvoiceList, InvoiceDate > DateAdd(Now(), -400,Days)),Filter(SalesInvoiceList, InvoiceDate > DateAdd(Now(), -7,Days)))

 

This formula shows data from "SalesInvoiceList," filtered based on the drop-down menu.

 

> In some apps, the "Items" property of the gallery is complex (with filters, sorting, and so on), but the individual items are just pulled in directly from the data source. In this screen, it's the opposite case. The "Items" property is set to the following formula:

 

'Sales invoice'.

 

In other words, pull in all the data from the Sales invoice entity.

 

> Within the gallery, the formula for one of the items (the sales invoice total) is fairly complex:

 

Text(Sum(Filter('Sales invoice line',SalesInvoice.SalesInvoiceId=ThisItem.SalesInvoiceId),LineAmount),"[$-en-US]$##,###.#")

 

The data source for the gallery is Sales invoice but this formula also references Sales invoice line. For each sales invoice, the formula looks up the line items, totals the "LineAmount" values, and formats the result as US currency. This pattern of referencing both a master and details table in a gallery can be very useful.

 

Other Relevant Blogs and Online Resources

Understand data forms in PowerApps

Understand variables in PowerApps (collections and context variables)

Categories:

Mobile App Design and User Experience

Comments

  • Niglb Profile Picture Niglb
    Posted at
    Invoice Management (Microsoft sample)
    Could this be brought back since Invoicing was discontinued in O365? I used it that feature!
  • Scott0044 Profile Picture Scott0044 137
    Posted at
    Invoice Management (Microsoft sample)

    I speculate that they deliberately removed this app due to the release of 'Invoicing' with the business sub.  I switched to Invoicing a couple years ago from an InfoPath form I built.   Invoicing is retiring in FEB.  I suspect Invoicing and the power apps template are connected with the Dynamics 365 license.  I'm going to attempt a simple solution in Power Apps/modern SP list.

  • bvcitro1 Profile Picture bvcitro1
    Posted at
    Invoice Management (Microsoft sample)

    I'm having a hard time finding this template, any idea where it went or where I could find it?