








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









PL 400 Power Platform Developer Associate Imperative Development - Focus is on how to achieve the goal (Using your own code, make it exactly how you want it), fully customizable Declarative Development - Focus is on getting the result (using another service, you have to work with what you got) Like using a built-in function, it may not be fully customizable 3 Types of variables in PowerApps - Global variables Context variables Collections Gobal Variables - Most traditional, use Set( ) to create and set its value. Can reference from anywhere in your app. Context Variables - Only available on the screen where you create it using the UpdateContext( ) function. Allows you to use the same variable name on multiple screens, but maintain the value separately. Like a local variable. Collections - Special type of variable for storing a table of data. Like global variables, they can be used throughout your app using Collect( ) or ClearCollect( ) Getting a user's name - "Welcome " & User().FullName - Displays a string titled 'Welcome' and queries AD for the user's DisplayName. If you repeatedly did this for every screen, it constantly queries AD. You should set a global variable instead: Set(varUserDisplayName, User( ).FullName) OnStart of the screen and then change the label to: "Welcome " & varUserDisplayName
Tracking status in a variable - CountRows(Filter(InvoiceEntity, CustomerNumber = ThisCustomersNumber And Status = "Outstanding")) > 3 Warning icon that displays only if the customer has more than 3 outstanding invoices. This can be repetitive, so instead: Set(varOustandingExceeded, CountRows(Filter(InvoiceEntity, CustomerNumber = ThisCustomersNumber And Status = "Outstanding")) > 3) Now change the visible property to the variable. Implement a pop-up box when using a contextual variable - UpdateContext({varShowPopUp: true}) for the OnSelect property of a button. Then, set the visibility property to varShowPopUp. Benefit is that you can also declare more than one variable at a time: UpdateContext({varCount: 1, varActive: true, varName: User().FullName}) Purpose of using collections - Optimize performance by reducing calls to the same table in a data source. To store a copy of the Projects table from your data source into a collection called collectProjects, use this formula: Collect(collectProjects, Projects) Considerations when using collections - Not delegable - By default, only the first 500 records are retrieved/stored. Collections are not linked to data source after creation - This means that changes to the data in the collection do not automatically save to the data source. Collections are temporary - When you close the app, it clears out the collections so you will need to write data to a source before closing. Dynamic collections - You can create collections with your own data instead of retrieving through a source:
CountA - Counts the number of records that aren't blank in a single-column table. Includes empty text ("") in the count. Average - Calculates the average, or arithmetic mean, of its arguments Max - Finds the maximum value Min - Finds the minimum value Sum - Calculates the sum of its arguments StdevP - Calculates the standard deviation of its arguments VarP - Calculates the variance of its arguments ForAll Features - Can include functions that take action, such as modifying records of a data source with the Patch and Collect functions. You can't modify the table that is subjected to the ForAll function. The formula can call methods on connections You can perform multiple actions using ;
Patch(Accounts, ThisItem, {Category: Category.'Preferred Customer'})
Use Patch( ) to create a new record - Include name of data source to edit Defaults( ) returns a record that contains the default values for the data source. Include the columns you want to populate in the new record. Specify the name of the column to update followed by the value to write to that column. Patch(CustomerOrders, Defaults(CustomerOrders), {Region: "Americas", Country: "Canada"}) Use Patch( ) to edit a record - Include name of data source to use The record you want to edit in the data source (Most common way is to use LookUp( ) to narrow) Include the changes you want to make Patch(CustomerOrders, LookUP(CustomerOrders, ID = 1), {Region: "Asia", Country: "China"}) Update columns with Patch ( ) Tips - Make sure you update all required columns from your data source You can update one or many columns Make sure your column names are spelled and capitalized correctly (Case-sensitive) Make sure to write the correct data type (If int, don't write string) Patch(CustomerOrders, Default(CustomerOrders), {Status: "Pending"}) - Creates a new record and sets the status column to the string value of "Pending" Set(varStatus, "Under Review") Patch(CustomerOrders, Default(CustomerOrders), {Status: varStatus}) - Stores the string "Under Review" in a variable named varStatus Creates a new record and sets the status to the string value "Under Review" Patch(CustomerOrders, Default(CustomerOrders), {Status: Dropdown1.Selected.Value}) - Creates a new record and sets the status column to the value of the selected item in the drop-down box
Power Apps is a flexible platform that allows you to build your own mass deletion functionality as required by your business needs. - Power Apps is a flexible platform that allows you to build your own mass deletion functionality as required by your business needs.
A) Adjust the row limit from 500 to 2000 records and then ignore the warning. B) Determine if the limited returned data causes issues for the functionality of your app and design your app as appropriate. C) Ignore it, warnings aren't significant and the user knows how to deal with the warning. D) Try a different function because Power Apps doesn't run if there are warnings. - Determine if the limited returned data causes issues for the functionality of your app and design your app as appropriate. When combining delegable and non-delegable functions in a formula what happens? A) The data is only limited for the non-delegable portion, which in no way affects the delegable functions. B) You can't combine delegable and non-delegable functions in the same formula. C) Power Apps generates errors only if the app has more than 2000 records. D) The delegable functions might become non-delegable reducing the amount of data returned by the formula. - The delegable functions might become non-delegable reducing the amount of data returned by the formula. Use refresh sparignly - The refresh function is great for showing the latest data in your app but when submitting a form and then going back to a gallery control, powerapps already does this for you. ClearCollect to improve data callls - Use this function to reduce the number of calls to your app so that OnStart, you call the data and then store it then use that throughout the app. Collect isnt delegable, only returns the first 500 records. Use the Concurrent function to reduce the number of collect calls - When calling 3 clearCollects in a row, it has to process each one at a time, instead, use Concurrent
Concurrent( ClearCollect(colDepartmentList, Filter(DepartmentList, Status = "Active")), ClearCollect(colCompanyList, CompanyList), ClearCollect(colRegions, RegionList) ) Preview Features - Features that are well-tested and close to being released. Experimental Features - Features that might change, break, or disappear at any time. They are off by default. OnStart vs OnVisible - OnStart - App-level property. Formulas are run once when the app starts and must run before the app fully opens. OnVisible - Per-screen property. Formulas are run every time a user navigates to the screen. Timer - Can be used to capture how long your formula takes to run.