Skip to main content

Posts

Showing posts with the label Canvas App

Database actions - PAD

  POWER AUTOMATE DESKTOP - DATABASE Pre-Requisites Power Automate Desktop Access to database  Under the database action, we have only three sub actions, namely: Open SQL connection Execute SQL statement  Close SQL connection Open SQL Connection The first step is to connect to the database. So, we will use the Open SQL connection action and provide a connection string to establish the connection (the connection string in the video is a sample). When the connection is successful, the connection details is stored in a variable during execution. Execute SQL statement This action can be used to execute SQL queries. Here, I am using select query and the result is stored in a variable of type datatable. Close SQL connection It is a best practice to always close the database connection once the required queries are executed. YAY! BONUS!😮 How to execute a stored procedure using database action? Stored Procedure without arguments Stored Procedure with arguments (Comma separated in...

Stopwatch - Canvas App

Just tried a STOPWATCH in Canvas App! Note: The play/reset/pause buttons are images (SVG). Will post soon: Steps to create this app!!

Display details of currently logged in User - Canvas App

 Display Logged In User Details Create a canvas app, insert a label control and try the following: USER NAME EMAIL For other details like country, use the Office 365 Users connector as shown below: Try them out! Have fun building canvas apps. Do leave a comment for any questions.

LookUp Function

 LOOKUP FUNCTION - CANVAS APP PRE-REQUISITE Login to  Power Apps Use a Dataverse table for this example BUILDING THE APP STEP 1:  Create a Canvas app. Add a gallery and a label. STEP 2:  Make the "Users" table as the data source of the Gallery. STEP 3:  LookUp function finds the first record that matches a formula. In this example, I use lookup to find the full name of the user who is a "HR Manager". LookUp(Users, Title = "HR Manager").'Full Name' OR  LookUp(Users, Title = "HR Manager", 'Full Name')  We use the gallery to see if Wes is the HR Manager. (To verify if the Look-up function gave the correct output) Note: We used the LookUp function within a label, because it returns 1 record and we're displaying 1 column of the returned record. That's a single value.  Do try it for other tables and columns! Please leave a comment if you have queries.

Browsing through a Gallery

 SEARCHING THROUGH A GALLERY PRE-REQUISITE Login to your  Power Apps Account Create a Canvas App or Open an existing one and add a screen Any data source which has a few data rows, that can be used as source in the gallery. OBJECTIVE Suppose, we have a gallery which has thousands of data, we wouldn't want to sit and scroll through everything until we get the one row we want. Instead, we want to search through the gallery using a search box. Let's see how to achieve that! Controls used: Gallery and Input Textbox Formulae used: Filter ( ), IsBlank ( ) MAKING IT HAPPEN😍 STEP 1:  Insert control: Text Input, name it "SearchBox", remove the default value and format it as per your style/requirement. STEP 2:  Insert a gallery, name it "galPizza", insert label into the gallery to display pizza names. Format it as you desire. Note: I added a Search Icon within the text input box, for a good look-and-feel. STEP 3:  I will be using the Pizza Table, which is a custom ta...

Filter A Gallery - Canvas App

 Filter A Gallery - Power Apps PRE-REQUISITE Login to your  Power Platform  account. Create a blank Canvas App. A Dataverse table with data in it is required to display as a data source in the gallery. FILTER A GALLERY STEP 1: Adding a vertical gallery to the canvas and select a data source (in this example, Pizzas table). STEP 2: Modifying the gallery controls. Click on the label on the first row to change. I changed the Text property from ThisItem.'Created On' to ThisItem.Crust. Note that all types of crusts are visible in the gallery. STEP 3: Now I will use the Filter - PowerFx to filter the gallery to display only the Pizzas which are of "Thin Crust". Filter ( DATASOURCE, FORMULA1, [, FORMULA 2, ...]); Use the filter function in the Data Source/Items property of the Gallery. Here, Pizzas  (a custom Dataverse table) is the Data Source and for the formula , I am checking if the text "Thin Crust" is available in the column Crust. Note that, as soon as the...

PowerFx - SUM - Canvas App

 Sum Of Two Numbers - PowerApps I hope you get a clear idea on the usage of the Power Fx. PRE-REQUISITE Login to  PowerApps Create a Canvas App or Open an already existing  Canvas App BUILDING APP - USE LABELS AND SUM STEP 1: Add two "Text Input" into the Canvas. STEP 2:  Add a "Label"  into the Canvas. STEP 3: Use the SUM Power Fx. PLAYING THE APP TO SEE RESULTS We see how two numbers adds up and is displayed in the label. Please leave a comment, if you have any queries!

Gallery Control In Canvas App

 Gallery Control In Canvas App PRE-REQUISITE Login to  Power Apps Create a sample canvas app Create a Dataverse table and add data into it, or use an already existing table. 👉 Here's how to "Create Dataverse Table" GALLERY CONTROL If you have a table, with a number of columns, and having different datatype, then you use the Gallery control in the Canvas app to display it using the Label control. You can also add other Controls like Icons, Buttons, within a Gallery. When you make changes to the first row of a gallery, the changes are reflected to the rest of the rows in that gallery. TYPES OF GALLERY CONTROL IN CANVAS APP VERTICAL GALLERY This is how a vertical gallery looks like. By default, the gallery is given a default source "CustomGallerySample" to display. The gallery layout has an Image Control, an Icon and Two Label Controls, where one looks like Title & the other subtitle. CHANGE GALLERY LAYOUT CHANGE LAYOUT MANUALLY You may also change the layout ...

Back ( ) and Navigate ( ) - Canvas App

 Back ( ) & Navigate ( ) - Canvas App PRE-REQUISITE Login to your  Power Platform Create a Canvas App of your desired screen-size NAVIGATE ( ) Navigate allows you to switch between screens. That is, telling my app that when I click some UI element/Control [like a button], I want this screen to appear/be displayed on the screen. BACK ( ) Back allows you to get back to the screen which was displayed before the current screen. That is, telling my app to go back to previous screen when I click on some UI element [like a back button]. USING NAVIGATE AND BACK IN CANVAS APP A minimum of two screens are required to switch between them using Navigate and Back. Adding new screen in the Canvas App Objective 1: I will navigate from Screen3 to Screen4 using a button click and Navigate formula Insert a button and format it as you desire Use the formula "Navigate(ScreenName)" in the OnSelect property of the Button. Then,  Play the app to see when the button is clicked, we navigate f...

Set( ) Function - Canvas App

 Set ( ) function - Canvas App PRE-REQUISITE Login to  Power Apps Create a blank canvas app with screen-size of your choice In this post, we learn how to use the Set ( ) function in Canvas app for variables of different datatypes. Setting Text/String variable To demonstrate this, I will first add a Button [UI element] into the Canvas. In the Button properties on the right side, I will change the text within the button. I will also add Text Labels to display a text. Using Set ( ) function to set a text "Hello" to a global variable called "varString". Displaying this variable value in the Text Label. Set ( varString, "Hello" ); OnSelect : What has to happen when we select that UI element i.e., giving the button a behavior [Giving it a Purpose 😉] Notice that when we choose the variable "varString" under the text property of the label, the label becomes empty. The value "Hello" will only be visible when you actually play the app and click...