Vous êtes sur la page 1sur 41

Power Platform

tutorial
Stocktake case
Produce an app using Power
Platform tools to help a burger
restaurant to manage its stock
easily.

November 2021

kpmg.fr
Sommaire

1 Power Apps
2 Power Automate
3 Power BI
Project team members
Data Team

Gilles Michel-Leitao Kamyar Combadiere Ismail Roukbi Albane Fortier


Manager Junior Junior Junior confirmé

Il est diplômé d'un Master Grande Ecole Spécialisé en Il est double-diplômé d'un diplôme d'ingénieur en Ingénieur diplômé de Cytech en informatique spécialité Diplômée de l'ISEP en informatique spécialité
Audit et Conseil de Neoma Business School. Business Intelligence & Analytics de Cytech ainsi que Business Intelligence, Ismail a effectué un double diplôme Business Intelligence, Albane a intégré KPMG en
Gilles a 3 années d'expérience au sein des équipes Audit d'un diplôme de Management de Grenoble EM. en management à Grenoble école de Management. mars 2020 pour son stage de fin d'étude. Depuis
Technologie, Media & Télécom de KPMG où il est Kamyar à rejoint les équipes de KPMG en mai 2021, En rejoignant KPMG en mai 2021, Ismail a participé à son arrivée, elle a pu travailler sur différentes
notamment intervenu sur l'audit de JCDecaux, SFR, après une première expérience d'un an en tant que différentes missions au sein de la tribu Data. Il a eu missions avec les équipes data et les équipes
Warner Music et des startups. Consultant Business Intelligence où il a pu réaliser l'occasion d'intervenir sur des sujets liés à l'analyse des d'audit IT.
Il a ensuite rejoint les équipes Data Analytics depuis diverses missions orientées Data & Analytics. données dans le cadre de missions d'audit financier et a Au sein de la tribu Data, Albane a eu l'occasion de
désormais 3 ans et y conduit des missions d'assistance à Au sein de la tribu Data, il intervient sur des sujets liées à participé à des missions de conseils autour de l'audit monter en compétences sur des sujets liés à
l'audit ainsi que des missions de conseil auprès des l'analyse/visualisation de données, à l'audit financier et interne et la gestion des risques. l'analyse de données, à la Data Visualisation et à
directions financières de grands groupes et PME. également au process mining. l'audit financier.

https://www.linkedin.com/in/gilles-michel-leitao/ https://www.linkedin.com/in/kamyar-combadi%C3%A8re- https://www.linkedin.com/in/ismail-roukbi/ https://www.linkedin.com/in/albane-fortier-


a6884a156/ 5abb5814a/

Tech Solutions Team

Mehmet Serttas Benoît Pabst Akhilesh Ramburuth


Manager Junior Junior confirmé

Il est diplômé d’un Master en Finance d’Entreprise de Il est double-diplômé d'un diplôme d'ingénieur en Il est diplômé d'un Master en Systèmes d’information de
l’EDHEC. Mehmet a 7 ans d’expérience dans la Développement Logiciel de l’ESEO ainsi que d'un l’Université de Toulouse avec une spécialité en Ingénierie
transformation digitale de la Fonction Finance. diplôme de Management d’Audencia Business School. des processus métiers. Après une première expérience
Avant d’intégrer le Conseil, il a travaillé pendant 3 ans Benoît a rejoint les équipes de KPMG en novembre 2021, en tant que Chef de projet, Akhilesh a rejoint KPMG
dans les secteurs aéronautiques et informatiques. après une première expérience en tant que Consultant Maurice où il a effectué des missions de type IT Risk
Chez KPMG, il conduit des missions d’intégration ERP et Fonctionnel. Il a pu travailler sur des sujets Consulting et CIO Advisory. Il a part la suite intégré
fait partie de l’Alliance entre Microsoft et KPMG où il d’homologation fonctionnelle et de gestion de projet IT. KPMG France courant 2021.
développe nos activités Business Applications sur les Au sein de la tribu Microsoft de KPMG, Benoît Au sein de la tribu Microsoft, Akhilesh a l’occasion de
produits Dynamics 365 et Power Platform. accompagne l’équipe dans les réalisations autour de la travailler sur des projets de digitalisation de la fonction
Power Platform et plus globalement sur l’écosystème finance en employant des solutions Microsoft.
applicatif Microsoft.

https://www.linkedin.com/in/mehmet-serttas-72a821b1/ https://www.linkedin.com/in/benoitpabst/ https://www.linkedin.com/in/akhi-ramburuth/

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 3
Microsoft Power Platform
One low-code platform that spans Office 365, Azure, Dynamics 365, and standalone applications

Power BI Power Apps Power Automate Power Virtual Agents


Business analytics Application development Workflow automation Intelligent virtual agents

Common Data Data AI


connectors Builder
Service

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 4
Heineken-Assistant commercial virtuel
Défi : Le processus de création et de renouvellement des contrats des points de vente était fait par échange de mails et via plusieurs fichiers excel. L’équipe commerciale avait
difficilement accès aux informations de vente ou aux données clients pendant la vente. Elle pouvait difficilement proposer un niveau et un panier de
réapprovisionnement/approvisionnement adéquats.

Solution : Une application qui accompagne l’équipe commerciale au moment de l’interaction avec le client pour fiabiliser et accélérer le processus de vente.

Objectifs de l’équipe commerciale


Informations clients en temps
1
réel
Proposer un panier de
2 réapprovisionnement/approvisionnement
adéquat
Atteindre ses objectifs de ROI par
3 bar/restaurant

Architecture
Azure
Approval Workflow

Inputs Applications mobile Outputs Recommendation Engine


KPMG SIGNALS
Fiches clients Checklist automatisé
Back Office
Front Office Authentification
Historique des Recommandation d’un
contrats panier de produits

Historique des Recommandation


remises, rabais et d’investissement Data Analysis
Dashboards
ristournes
Projection
Listes de produits économique

ROI et marge

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 5
Targets of the day

1 2 3 4
Getting familiar with Handling the tool Asking your Preparing your first
Power Apps and through a practical questions and app
Power Automate case sharing your
visualisation needs

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 6
Your first app by the end of the day (1/3)

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 7
Your first app by the end of the day (2/3)

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 8
Your first app by the end of the day (3/3)

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 9
Important notes
›Prerequisites for the tutorial:
Information to log into your Microsoft account
Catalog.xlsx
Orders.xlsx
Paper with the barcodes

›Microsoft lectures:
https://docs.microsoft.com/fr-fr/learn/paths/power-plat-fundamentals/

›Videos
Barcode scanner: [PowerApps] Le Contrôle Scanneur de code Barre – YouTube
Email from PowerApps: https://www.youtube.com/watch?v=Da4do2DxmJE
Send information from a collection to Power Automate: Send a Collection from Power Apps to Flow (powerobjects.com)
Create HTML table from JSON: How do I create an html table from json? - Power Platform Community (microsoft.com)
Add CSS to the HTML table: https://ryanmaclean365.com/2020/01/29/power-automate-html-table-styling/
Update an excel file from PowerApps: https://www.youtube.com/watch?v=MclJ_O9HvJQ
Change date time format: https://docs.microsoft.com/fr-fr/powerapps/maker/canvas-apps/functions/function-text

›Documentation
Tool documentation is available at the following address: Microsoft Power Apps documentation - Power Apps | Microsoft Docs

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 10
1 Power Apps
Microsoft Power Apps
Build high productivity apps you need for your business with a rich set of tools.

Power Apps drives business transformation

188% 74% 3.2 hours/


week

ROI over Reduction in Avg improvement in


three years dev cost employee productivity

1 2 3 4
Build highly tailored Design low-code portals Create sophisticated apps Integrate and extend
applications for external users from your data your apps

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 12
1 Power Apps

Import data
| Power Apps |

Sign in
Go to Power Apps website (https://powerapps.microsoft.com/en-us/) and log into your Microsoft account.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 14
| Power Apps |

Connect your database (1/2)


— Open the Excel file “Catalog” sent
previously. It will be the database for the
app,

— Save this file in Onedrive.

— Click on “Create” in the vertical menu bar,

— In the section “Start from data”, choose


“Other data sources”, then “New
connection” and select
“OneDrive”/”OneDrive for Business”,

— Log into your OneDrive account.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 15
| Power Apps | To interact with your app, click on the “play”
button in the top right hand corner or press

Connect your database (2/2)


“Alt” continuously.

— Select the Excel file “Catalog” previously


saved.

— Select the table “Catalog” and connect


your database.

You already can see a nice beginning for


your app. 3 screens were already generated
from your database.

On the first screen, you can see all the items


of your database displayed as a gallery. If
you select one of them, you will be sent to
the second screen which displays the
information of this item. By clicking on the
edit button in the top right hand corner, you
will reach the last screen to update the item’s
details.

You may not have the same information


displayed in the gallery. It doesn’t matter, we
will update it later anyway.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 16
1 Power Apps

Update the app


| Power Apps |

Change the parameters


— Give a name to the app using the tab parameters.

You can also change the icon, the background colour for the icon and add a description.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 18
| Power Apps |

Save your app


— Save your app (File >> Save as >> Save in Power Apps),

— Go back to your app, we will share it later.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 19
| Power Apps | You may not have the same information

Update the gallery (1/2)


displayed in the gallery.

1
Using your database, Power Apps suggests
you the information to provide in your gallery
but you can change it.

— Select the first line of your gallery


(“Beverage” here).

In this case, Power Apps chose to display the


product category here.

— Change it to “ThisItem.Product”.
2

Now, the name of your product is displayed in


the first line. Let’s update the other ones.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 20
| Power Apps | To update the format on the whole gallery,
you only need to modify the first item.

Update the gallery (2/2)


— Select the second line and change it to
“ThisItem.Category”,

— Change the last one with “ThisItem.'Code


barre’”.

Now, your gallery should look like this.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 21
| Power Apps |

Edit the style (1/3)


1 2
We will first add the logo of the company at
the top of the first screen.

— Select the whole gallery (not only the first


item line) and make it smaller,

— Drop down the search box,

— Drop down the header with all its


components (one by one).

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 22
| Power Apps |

Edit the style (2/3)


— Go to “Insert” then “Media” and select “Image”, 1 3

— Add the logo,

— Make the image a bit smaller and put it in the


centre of the white space.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 23
| Power Apps |

Edit the style (3/3)


We will change the colours of the app to follow the ones of the company.

— Select “BrowseScreen1” in the screens menu on the left,

— In the properties, choose “fill” and fill out with the appropriate hexacode (FAF5E5),

— Select the rectangle bar “RectQuickActionBar1” in the screens menu,

— In the properties, choose “fill” and fill out with hexacode “647884”.

We will now update the style of the gallery to make it look better.

— Select “BrowseGallery1” in the screens menu to select the whole gallery,

— Check “Show navigation”,

— Change the background colour in the properties on the right and put it in white,

— Make the gallery a bit smaller to make it look like following,

— Edit the other screens with the same colours,

— Save the app.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 24
1 Power Apps

Download the
mobile app
| Power Apps | If your mobile app asks to access your
camera, accept it, we will need it later to use

Download the mobile app


the barcode scanner.

To use and test all the components available in your app, you
will need to download the mobile app.

— Download “Power Apps” on your phone,

— Log into your Microsoft account.

Now, we will share the app to be able to use it on a phone.

— Save your app (File >> Save as >> Save in Power Apps),

— Share the current version,

— Go back to the mobile app,

— Look for your app and open it.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 26
1 Power Apps

Add barcode
scanner
| Power Apps | If your barcode scanner component is
named differently, you need to update

Add and configure the component (1/4)


your formula with the appropriate
name.

Currently, you already can use the search box to find an item in your app. We
will add another component to look for a specific item, the barcode scanner.

— Go to “Insert” then “Media” and select “Barcode scanner”.

A blue button came up in your app. Now, we need to configure it. We will
collect the scan result in a collection and filter our gallery on the barcode
scanned.

— Select “OnScan” in the dropdown list of the barcode scanner configuration.

— Insert the following function: Collect(ScanCollection;{'Barcode Result': BarcodeScanner.Value};{'Who scanned' : User().FullName};{Date : Now()})

Let’s have a closer look at this function. ScanCollection will be the collection where the information of the scanner will be gathered. If this collection
already exists, the information will be added directly. Otherwise, the collection will be created with 3 columns “Barcode Result”, “Who scanned” and
“Date”.

› The user function returns all the information about the current user. Here, we choose to have only the Name of the user (.FullName).

› The function Now() returns the current date.

› To get the information of the barcode scanner, we need to specify the name of the component (BarcodeScanner) and add the suffix .Value.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 28
| Power Apps |

Add and configure the component (2/4)


— Edit the properties of your barcode scanner component as follow using the
configuration bar on the left:

› Text: Barcode Scan,

› Color: RGBA(100; 118; 132; 1),

› Fill: RGBA(255; 255; 255; 1),

› BorderColor: RGBA(100; 118; 132; 1),

› BorderStyle: Dashed,

› BorderThickness: 5,

› Size: 20.

— Edit the search box with HintText = “Search for”,

— Update the size of the component to make it look like this,

— Save the app.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 29
| Power Apps | The function used to filter the gallery depends on
the default layout created by Power Apps at the

Add and configure the component (3/4)


beginning of the case. You can change the
columns used to filter but it is important to use
the bar code columns as one of those ones.

Now that our component is created and configured, we need to update the search function of the gallery.

— Select the gallery,

— Go to Items configuration.

You can see the function already used to filter your gallery with your search box:
SortByColumns(Search([@Catalog]; TextSearchBox1.Text;
"Category";"Product";"Product_x0020_unit_x0020_category"); "Category"; If(SortDescending1; Descending;
Ascending)).

We will use the same formula for the barcode scanner but with the barcode as one of the columns to search:
SortByColumns(Search([@Catalog];BarcodeScanner.Value;"Category";"Code_x0020_barre";"Product"); "Category";
If(SortDescending1; Descending; Ascending)).

If a barcode was scanned, we want to filter the gallery with this barcode, otherwise, we want to filter it with the
search box.

— Replace the function in Items configuration with this one: SortByColumns(If(IsEmpty(ScanCollection.'Barcode


Result'); Search([@Catalog]; TextSearchBox1.Text; "Category";"Product";"Product_x0020_unit_x0020_category");
Search([@Catalog]; BarcodeScanner.Value; "Category";"Product";"Code_x0020_barre")); "Category";
If(SortDescending1; Descending; Ascending))

— Make your gallery smaller.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 30
| Power Apps | To add several functions in a
component settings, they must be

Add and configure the component (4/4)


separated with two commas.

— Add a data table,

— Connect it with your collection ScanCollection,

— Go to the properties of your table,

— Click on “Modify the fields”,

— “Add a field”,

— Select “Barcode Result” and add it,

— Update the HeadingFill of the table with RGBA(100; 118; 132; 1),

— Update the Visible setting of the table with the following function to display
the table only when a barcode is scanned:
If(IsEmpty(ScanCollection.'Barcode Result');false;true),

— Update the onSelect setting of the refresh icon button to clear the scan
collection when refreshing: Refresh([@Catalog]);;Clear(ScanCollection),

— Save and publish your app.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 31
1 Power Apps

Add the order


functionality
| Power Apps |

Edit the detail screen


We will add a button in the detail screen to order the item selected.

— Go to the detail screen,

— Make the detail form a bit smaller,

— Add a button,

— Update the text of this button with “Order”,

To collect information on the item selected, we will create a collection like already done before with the scanner.

— Update the OnSelect setting of the button with the following formula: Collect(OrderCollection;BrowseGallery1.Selected),

— Change the style characteristics:

› Fill: RGBA(100; 118; 132; 1),

› HoverFill: ColorFade(Self.Fill; -20%).

— Save the app.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 33
| Power Apps | To add several functions in a
component settings, they must be

Fil the actual stock (1/5)


separated with two commas.

We will create a new screen on which we will fill the actual stock for the item selected.

— Add a new blank screen,

— Rename it “Order First Screen”,

— Add a “flexible height” gallery,

— Connect it to the new collection “OrderCollection”.

Let’s try it now. We first have to create the link between the detail screen and this one.

— Go back to the detail screen and click on the order button,

— Update the OnSelect setting and add the function: Navigate('Order First
Screen';ScreenTransition.None),

— Try to run your app with the play button,

— Save the app.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 34
| Power Apps | To add some text in your formula,
write the text in quotation marks and

Fil the actual stock (2/5)


add it using “&” symbol.

— Delete the barcode and the biggest picture,

— Make the first picture bigger,

— Copy and past the text component and change it with the product name (ThisItem.Product),

— Repeat this action with the barcode (ThisItem.'Code barre’ ) and the price (ThisItem.Price),

— Update the barcode formula: "Barcode: " & ThisItem.'Code barre’ and the price formula:
"Price: " & ThisItem.Price,

You can change the style parameters (FontWeight, Italic, Size) to make it look like following.

— Add a text input in the gallery,

— Update the Default setting of the new input text to Blank(),

— Add two text labels: “Fill with the quantity for actual stock” and “Actual stock: ”,

— Change the style parameters (FontWeight, Italic, Size, BorderColor) to make it look like
following.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 35
| Power Apps |

Fil the actual stock (3/5)


1 2

— Drop down the gallery,

— Copy and paste the header and the back arrow from the detail screen,

— Update the text label with “Order screen”,

— Change the style parameters (Fill property for the gallery and full screen) to make it look
like following,

— Update the back arrow OnSelect setting with the following formula:
Back();;Clear(OrderCollection);;Clear(ScanCollection)

— Add a button (outside of the gallery),

— Change the text to “Submit” and update the style (Fill and HoverFill).

Now, we will create a second screen which will use the actual stock filled and calculate the
number of items that should be ordered.

— Duplicate the screen “Order First Screen”,

— Rename it “Order Second Screen”,

— Save the app.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 36
| Power Apps | If the text input in Order First Screen is
not named “TextInput1”, you will need to

Fil the actual stock (4/5)


update the formula with the appropriate
name.

— Change the text from “Fill with the quantity for actual stock” to “Fill with the quantity to order”,

— Change the text “Actual stock: ” and add the number filled in the text input in the previous screen and
the product unit by using the following formula: “Actual stock: " & TextInput1.Text & " " &
ThisItem.'Product unit category’”,

— Copy and paste this text label and update it with the following formula: “Recommended stock: ” &
ThisItem.Recommended & “ ” & ThisItem.'Product unit category’,

— Add a new text label with the following formula: If((TextInput1.Text-ThisItem.Recommended)<0;”You


should order ” & (ThisItem.Recommended-TextInput1.Text) & “ more ” & ThisItem.'Product unit category’;“No
need to order more”),

— Update the Color setting of this new text label with the following formula: If((TextInput1.Text-
ThisItem.Recommended)<0;DarkOrange;Green),

— Update the button text from “Submit” to “Order”,

— Locate the component to make it look like following.

We will suggest the number of items to order in the text input with a default value.

— Update the Default setting with the following formula: If(ThisItem.Recommended-


TextInput1.Text<0;0;ThisItem.Recommended-TextInput1.Text),

— Update the back arrow OnSelect setting with the following formula: Back().

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 37
| Power Apps | If the text input in Order Second Screen
is not named “TextInput1_1”, you will

Fil the actual stock (5/5)


need to update the formula with the
appropriate name.

We will create a new collection which will gathered all the items ordered.

— Update the OnSelect setting of the order button with the following formula:
Collect(OrderCollection2;{product: BrowseGallery1.Selected.Product;image:
BrowseGallery1.Selected.Image;quantity: TextInput1_1.Text}),

— Go back to Order First Screen,

— Update the OnSelect setting of the button with the following formula: Navigate('Order
Second Screen’),

— Try from Ordre First Screen with the play button,

— Save the app.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 38
| Power Apps |

Create the order recap


— Create a new white screen and name it “Order Recap”,

— Copy and paste the header,

— Edit the background colour of your screen,

— Add a new vertical gallery,

— Connect it to the new collection “OrderCollection2”,

— Click on the arrow in the gallery,

— Update the OnSelect setting with the following formula: Remove(OrderCollection2; ThisItem),

— In the properties on the right menu, change the arrow and put a bin instead,

— Add a home icon in the header and change the colour,

— Edit the OnSelect setting with the following formula:


Navigate(BrowseScreen1);;Clear(OrderCollection);;Clear(ScanCollection),

— Go back to Order Second Screen and add this part to the existing formula: Navigate('Order Recap’),

— Save and publish the app.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 39
1 Power Apps

Welcome screen
| Power Apps | By default, the screen at the top of the
tree is the first one displayed by Power

Create the welcome screen


Apps.

— Create a new white screen and name it “Welcome Screen”,

— Move up your screen (before BrowseScreen1),

— Select an image for the background of this screen in the right vertical menu,

— Change the position to “Fill”,

— Add the logo of the company (Insert >> Media >> Image),

— Add a text label with the following formula for the text setting: "Welcome " &
User().FullName,

— Update the style settings: (FontWeight: Bold, Align: Center, Color: RGBA(255; 255; 255;
1)),

— Add a new button as big as the background image,

— Update the style settings: (Fill: RGBA(0; 0; 0; 0), HoverColor: RGBA(0; 0; 0; 0), HoverFill:
RGBA(0; 0; 0; 0), Text: “”),

— Update the OnSelect setting with the following formula: Navigate(BrowseScreen1),

— Save and publish the app.

© 2021 KPMG S.A., société anonyme d'expertise comptable et de commissariat aux comptes, membre français de l’organisation mondiale KPMG constituée de cabinets indépendants affiliés à KPMG International Limited, une
société de droit anglais (« private company limited by guarantee »). Tous droits réservés. Le nom et le logo KPMG sont des marques utilisées sous licence par les cabinets indépendants membres de l’organisation mondiale KPMG. 41

Vous aimerez peut-être aussi