Aijay@1234: Power Apps
Aijay@1234: Power Apps
[email protected]
Aijay@1234
https://thimmapuram.sharepoint.com/_layouts/15/viewlsts.aspx?view=14
Power Apps is a Platform as a Service. It enables you to create mobile apps that run on
different operating systems, such as Windows, iOS, and Android
Power Apps is a suite of apps, services, connectors and data platform that provides a rapid
application development environment to build custom apps for your business needs
Power Apps connected with other data sources like SharePoint, Microsoft 365, Dynamics
365, SQL Server, and so on (using common Data services)
Power Apps is a high-productivity development platform for business apps, and has four
major components:
Canvas apps
Model-driven apps
Portals
Microsoft Dataverse (common data services)
1. Easy integration with other Microsoft services - One of the primary reasons for using
Power Apps is that it’s easily connectable with other Microsoft services like Excel,
OneDrive, SharePoint, etc.
2. User-friendly Interface – Power Apps supports a user-friendly interface. With this,
you can build an app easily,
3. Cloud Connectivity - It’s extremely easy to connect to cloud services like SQL,
Dropbox, Google Drive, etc., with Power Apps.
4. App creation and sharing - Supports an easy drag and drop interface for the creation
of apps.
5. Cost-effective -
6. Common Data Service (CDS) - CDS allows you to store and manage data securely
used by business apps.
Common Data Service lets you securely store and manage data that’s used by business
applications. Data within Common Data Service is stored within a set of entities. An entity is
a set of records used to store data, similar to how a table stores data within a database.
Click on the new “icon and Create the New Environment” as show in below image
Power Apps Limitations
With Power Apps, you can retrieve a max of 500 items by default, but extendable up to
2000 (performance reduces)
Only one developer can work at a time if operating on the Canvas Application.
If SharePoint runs in the back end, attachment control will work fine. But if custom SQL
runs in the backend, then attachment control will be disabled.
JavaScript integration is not possible in Power Apps forms.
Power Apps cannot be shared with external users of your organization. It is designed to
be used internally for your business purposes.(Portal app it’s possible to access external
users)
What is the out of the box properties in Share point customized List Form?
Who can Edit the Power apps form “In Default Environment”?
================================================================
What is the Standalone Power Apps canvas App?
Can be open only from the list The form will be open in power
where we can created the form app studio and power Apps Mobile
Form customization only Default Form customization is possible in
environment (other environment any other environment (Like
not supported) prod/dev/uat)
You don’t need to share the form You need to provide a permission
because the form inherits on the App whom you want to
permission from the share point share the app
list when you customizing it just
publish it
Any one with the sharepoint list Only App creators and Co-owners
permissions have (to can customized the form
customization the form)
Canvas apps:
Canvas Apps easy way to crate the controls drag and drop the controls just like that Asp.net
controls Canvas apps give you the flexibility to arrange the user interface the way you want
it.
To generate a canvas app in below options
To get started, automatically generate an app from one of these sources, among others:
(how to build power apps) canvas app pull the data form over 200 unique data sources
a sample app
a template----à(templates is there like leave application, service desk)
Dataverse---àcommon data service like in built data source (tables,)
SharePoint--à(using SharePoint to create a canvas app)
Excel ---à(connecting to excel in your local or online)
1. If you add a Display form control, the user can display all fields of a record or only
the fields that you specify. If you add an (Read only)
2. Edit form control, the user can edit those fields, create a record, and save those
changes to a data source.(Read/write)
===========================================================
Variables in Power Apps?
Power Apps two types of variables
1. Local Variable-àdefined only one screen(integer ,string, Date time, Record value)
scope only one screen. (UpdateContext)
For Example: Update Context ({Variablename:User()}) (Record value storing)
2. Global Variable--à we can use all of the screens (Set)
How can you pass one screen to another screen? (Navigate and
Updatecontext)
Using--à Navigate (screen name,{Variblenam:Userinfo.Email})
Local variable
Navigate Screen
UpdateContext has no return value, and you can use it only within a behavior formula.
If( Value(TextBox1.Text) >= 0, Color.Black, Color.Red)
Use the Set function to set the value of a global variable, which temporarily holds a piece of
information
Set has no return value, and you can use it only within a behavior formula.
A global variable holds its value until the app is closed. Once closed, the global
variable's value will be lost and must be recreated when the app is loaded again.
Global variables cannot use the same name as an existing collection or control. It can
use the same name as a context variable
Set(
VarFormmode,
Defaults(Employee_onBoardings)
);
ClearCollect(): Clear the existing items first on and add the values inside the collection.
How to store the items in Table in power apps?
POC Link: https://make.powerapps.com/e/Default-1c1cef63-6df6-47f8-b1a8-6745cf3ebc8a/canvas/?action=edit&app-id=
%2Fproviders%2FMicrosoft.PowerApps%2Fapps%2F81d277c6-445c-4b60-aebf-7442ffa6e5f2
#PowerApps #PowerPlatform #CanvasApp
Build your first Power Apps Canvas App for Leave Management
System
Steps1: take one screen and within the screen add the gallery control and select the data
source
Setp2: we are passing the id in edit form: we are passing the context
Step3: now open the Edit screen as and item control as showing “SELECTED ITEM”
First we have to select any grid view label and set the height and apply for all
labels
We can’t add any row in the data table just we can use it and showing the data
Edit Button Click code
Difference between Datatable vs Gallery?
We can’t add any custom column a-part Customization is possible from the gallary
from the data table
Data table creation is simple and easy Designing is difficult
The Replace() function identifies the text to replace by starting position and length.
How to bind the dropdown values and /binding the drop down?
Note: screen onvisible wrote this below code
Select any Drop down text value and select the items as show in below image
Choices([@Leaves].LeaveType) ---on visible we can do it
Search condition in Grid view control----Goto Grid view Gallery and select “items”
wrote this below code
Filter(Leaves,DrpAllLeaves.SelectedText.Value in 'LeaveType'.Value)
ClearCollect(
Headercollect,
{
LeaveType: "Leave Type",
Planned: "Planned/Unplanned",
Manager: "Approver",
SD: "Start Date",
ED: "End Date",
Days: "No of DAYS",
Status: "Status",
Department: "Department Name",
Title: "Title"
}
);
ClearCollect(
LeaveTypeCollect,
{Value: "All Leaves"},
Choices([@Leaves].LeaveType)
);
ClearCollect(
LeaveStatusCollect,
{Value: "All status"},
Choices([@Leaves].LeaveStatus)
);
ClearCollect(
PlannedLeaveCollect,
{Value: "Select Type"},
Choices([@Leaves].SelectType)
);
//ClearCollect(DepartmentCollect,{Value:"All
Departments"},Choices([@Leaves].Department));
ClearCollect(
DepartmentCollect,
Choices([@Leaves].Department)
);
Filter code:
//Filter(Leaves,DrpAllLeaves.SelectedText.Value in 'LeaveType'.Value)// Showing data
only selected items
// but in oure case showing all items blank vaues
Filter(
Leaves,
Substitute(
DrpAllLeaves.SelectedText.Value,
"All Leaves",
""
) in LeaveType.Value,
Substitute(
DrpLeaveStatus.SelectedText.Value,
"All status",
""
) in LeaveStatus.Value,
Substitute(
DrpDepartment.SelectedText.Value,
"All Dept",
""
) in Department.Value,
//DrpDepartment.SelectedText.Value in Department.Value, // with out substring
If(
DrpPlanned.SelectedText.Value = "Select Type",
Or(
'Select Type'.Value = "Planned",
'Select Type'.Value = "Unplanned"
),
DrpPlanned.Selected.Value = 'Select Type'.Value
),
Or(TextInputsearch.Text in Title,TextInputsearch.Text in Manager.DisplayName)
)
Sort funcitons(): only choice columns, people picker columns only (in different datatypes
columns so we are using in Sort function only)
Syntax:
Sort By Column Sort column
SortBy column applicable for multiple Sort column only applicable for single
coumns but only same data type like column
“Text column only”
updateContext(
{
SortcolumnPref:"Textcolumn",
sortcolumnname:"Titile", sortcolumntyp:!
sortcolumntyp //Assending
}
)
At the time variable declaration code snippet for select the sort icon “Onselect
event” only Textbox code in variable declaration
-----------------------------------------------------------Code Snippet
Switch(
sorcolumnPref,
"Textcolumn",
SortByColumns(
Leaves,
sortcolumnname,
If(
sortDesccolumntype,
Ascending,
Descending
)
),
"Department",//sorcolumnPrefname ---variable declaration
Sort(
Leaves,
Department.Value,
If(
sortDesendingDepartment,
Ascending,
Descending
)
),
"Status",//sorcolumnPrefname ---variable declaration
Sort(
Leaves,
LeaveStatus.Value,
If(
sortDescLeaves,
Ascending,
Descending
)
),
"Enddate",//sorcolumnPrefname ---variable declaration
Sort(
Leaves,
Value(EndDate),
If(
sortDescEnddate,
Ascending,
Descending
)
),
"EnddNo of Daysate",//sorcolumnPrefname ---variable declaration
Sort(
Leaves,
Value(‘NoofDays’),----->choice column “Select type’.value
If(
sortDescNofdays,
Ascending,
Descending
)
)
)
-------------------------------------------------------------------------
How to Call Power Automate Flow from Power Apps with Parameters
Yes first we have created flow after that we call the action option is there the
flow is showing in power apps as show in below image
There are two options one is set variable and another one is collection
After that we are take one label and call this ------>First(Flow
up).email
Respond to power app and flow one action is there so we can use that action in power
apps:
Access Management for Power Apps Canvas App | Sharing Power Apps Canvas App
Co-Owner: can edit the application but can’t delete the app and can’t change the owner name
also
Restore the version it’s possible for last 6 months only in power apps
Manage Roles in Power Apps Canvas App with Power Automate and SharePoint
By using SqlServer------------->Datatable
How to Export and Import power apps like Dev to Qa and Production?
Steps: once we are exporting the package and open Extract the zip file and open the power app
folder and open the .json file (json formattor in online) and choose the Embedded app section
And change the site id, listid and List url (QA site /production site) : now your package is ready in
now you can importing the package in your apps site
Step 2: Create a collection in your Screen Visable mode show in below image
3:“personal infoscreen and workexperience screen on boarding screen pass the variable
“ VarFormmode”
Step 4: Display mode code: by default text fields are disabled mode when user enter the value on
that time form is edit mode
Final Step: Save Button code using patch button
I will describe a screen as a Mother container or Bag that holds multiple controls including Gallery,
Form and many other controls.
A Gallery control can show multiple records from a data source, and each record can contain
multiple types of data
The basic function of a form is to take input from a user and send those inputs or enteries
into the Datasource. This is a New form.
A form also help to edit what a User has previously entered into the Datasource. This is an
EditForm
Finally, a form also helps to View what has previously been entered into the Datasource by
the user. This is a Display or ViewForm.
Power apps component
Components are reusable building blocks for canvas apps so that app makers
can create custom controls to use inside an app, or across apps using a component
library. ”Re using the screen”
So we have to create a component Like Menu Header component now your
component is available in your custom action show in below image
App: is the object in this case your component hight /width is not suitable for your
app how can you do that?
What is the object in powerapps?
Apps.Activescreen.width------> refer to the current screen
9. Does the use of more and more connections in an app degrade the performance?
A: Yes, we can say that. For eg: If we want to capture the details of an employee using an
Office 365 connection, it can be a better choice to use a collection and store the details
rather than using the connection every time when a piece of info is needed.
10. What are the different license options available when it comes to the Storage aspects
of the Microsoft Power Platform
Dataverse for Apps Database capacity,/ Dataverse for Apps File capacity/ Dataverse for Apps
Log capacity.
11. Why is the Patch function used in canvas apps? Patch function is used to add or modify
records in a data source.
13. As a consultant, when can you choose Model-driven apps over Canvas apps?
A: When the data can be handled with Dataverse defined tables, model-driven apps can be
an easier option to implement a solution.
14. Can you share a canvas app with external business partners and contractors? Yes, we
can. Using Azure AD B2B external collaboration for the tenant, guest users can be invited to
use the app.
15. Which are the types of variables that are used in PowerApps?
A: Global variables and Context variables
16. Can you add responsiveness to the canvas apps? Yes, you can make use of the height
and width properties of app screens to achieve this. You can also make use of container
controls.
Delegation in Power Apps means process of retrieving data to the data source itself. This
means Power Apps will retrieve small amount of data to make sure the performance is
consistent. We often get delegation warning message coming To avoid the delegation
warning and to apply the filters in Power Apps here is a quick and easy way to achieve this.
17. When can you say that the Search() function may not be a good choice when you’re
working with Sharepoint data?
When the number of records in the data source is more than 500, it is recommended not to
use the Search function.
18. How can you distribute a canvas app with all the employees in an organization?You
can use the option share with “Everyone”
20. Suppose you have a custom website. How can you access data from this custom
website and use the same in the Power Apps canvas app?
A: We can make use of a custom connector to fulfil this requirement.
IsMatch returns true “if the text string matches the pattern”, generally with a regular
expression
Match returns blank if no match is found that can be tested with the IsBlank
function.
MatchAll returns an empty table if no match is found that can be tested with the
IsEmpty function.
Q7. Can you share a canvas app with external business partners and contractors?
A: Yes, we can. Using Azure AD B2B external collaboration for the tenant, guest users can be
invited to use the app.
The LoadData function reloads a collection by name that was previously saved with
SaveData. You can't use this function to load a collection from another source.
LoadData( Collection, Name [, IgnoreNonexistentFile ]),
Mostly used the offline apps and mobile apps (saved data,load data)
Q15. How can you distribute a canvas app with all the employees in an organization?
A: You can use the option share with “Everyone”.
Q17. How can you call a flow from another flow in Power Automate?
A: You can call another Flow within a Flow by making use of the HTTP request action in the
first Flow and When an HTTP request is received as a trigger of the second Flow.
Model-Driven Apps can connect and Connect and intract with more than
interact with only one data 250 + connectors
connector that is Data Verse.
Lookup Function();
The Lookup function only returns the first record from the
source database/table after it matches the filter criteria.
If the Lookup function matches the formula, either it returns
single row from the table or a single value.
If no record is found, Power apps lookup function returns blank
LookUp(tablename, age> 40 , Name)
PL-900 : https://partner.microsoft.com/en-in/training/assets/collection/pl-900-microsoft-power-
platform-fundamentals-1#/
PL-100 : https://partner.microsoft.com/en-in/training/assets/collection/designing-and-creating-
apps-with-microsoft-power-platform#/
PL-200 : https://partner.microsoft.com/en-in/training/assets/collection/implementing-microsoft-
power-platform-pl-200#/
PL-400 : https://partner.microsoft.com/en-in/training/assets/collection/exam-pl-400-gain-
knowledge-and-prep-for-the-exam#/
PL-600 : https://partner.microsoft.com/en-in/training/assets/collection/microsoft-power-
platform-solution-architect-pl-600#/