Skip to main content

Posts

Showing posts from April, 2022

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 incase of many a

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 from

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

Apply To Each Control in a Cloud Flow

How to use the "Apply To Each Control"? PRE-REQUISITES To practice this, login to the  Power Automate Portal Create a manually triggered cloud flow To understand how to use the "Apply to each" control, I will use Array variable. You may revisit Array Variable  post to get a brief idea. We use automation to do processes that are repetitive and has a defined set of steps. Most of these processes have steps that is required to query a bunch of data and enter that data into different applications, sequentially and repetitively. For these kind of actions, we normally apply the concept of LOOP (where a set of code/actions are done repetitively until a condition is met) APPLY TO EACH is a loop that executes the actions within its block sequentially, until it goes through each item in a list/table In this demonstration, I create an array of numbers, and add every number in the array to get the total. Here's the sample array of numbers that will be used, [ 22, 15, 72, 82

Power BI

  POWER BI Here's a brief idea on Power BI! Power BI is one of the tools available in the Microsoft Power Platform. Well, what is it used for? Data Visualization and Business Intelligence! Power BI connects to different data sources, transforms and cleans the data, creates different charts/visuals, which can be converted into dashboards, analysis reports, interactive visualizations, etc.  Business Intelligence In simple terms, BI is a process that uses software services to analyze and present data, that helps to make informed business decisions. Parts of Power BI Cloud-version (Power BI Service) Desktop version(Power BI Desktop) ==> Which is totally free to download😉 Mobile App(Power BI Mobile App). Data Sources [PowerBI Connects to] It can connect to Excel files, SQL Server Databases, Azure, JSON, XML, Oracle, Microsoft Dataverse, and so many other data sources. Take a look at the picture reference below: Data Visualizations [Available in PowerBI] Graphical representation of d

Current date/time [Different TimeZone]

  GET CURRENT DATE/TIME IN CLOUD FLOW PRE-REQUISITE Login to your  Power Automate account! In this post, we explore how to get current date-time and change the time-zone. STEP 1:  Create a manually triggered instant flow. STEP 2:  To get current time, we use the expression: utcNow() This returns the current time in UTC time standard. Using the Compose action: STEP 2:  Convert the date-time from UTC to UTC+5:30 (Indian time) Pass the output of the previous compose action. Select current time zone - UTC Select required time zone - UTC+5:30 Select a format of how your output should look! STEP 3:  We can also use an expression/formula to convert the time zone. This will be done in the Compose action. convertTimeZone(outputs('Compose'),'UTC','India Standard Time','MM/dd/yyyy hh:mm:ss tt') QUICK NOTE: > You may combine the expressions in step 1 and 3, to get the output in a single step instead of 2 steps. convertTimeZone( utcNow() ,'UTC','India

Variables In Canvas Apps

 Variables In Canvas Apps GLOBAL VARIABLES Simplest variable to create and use. Can be used in any screen for any UI element, within the app. Can hold value of any datatype: String, Number, Boolean, Record, Table. Created using the function:  Set() CONTEXT VARIABLES Similar to Global variable, the context variable can hold value of any datatype: String, Number, Boolean, Record, Table. Can be used/referenced within the context of a screen, hence the name. UpdateContext() and Navigate()  functions can establish the context variable. When the app is started, all context variables are blank. COLLECTIONS Collections can hold value of datatype: Table. Can be used/referenced anywhere in the whole app. Create and set collections can be done using the function:  ClearCollect() or Collect() It is easy to update a collection Please leave a comment if you have any questions! QUICK READS:  Variables in Canvas Apps

Cloud Flow - Add a new row to Dataverse

  ADD A NEW ROW TO DATAVERSE TABLE - POWER AUTOMATE FLOW Hey Guys! Previously, I showed you how to add a new data row into a Dataverse table using Canvas App, if you missed or wish to review it, here's a link to it 👉 Pizza Table (Canvas App) 👈 In this one, we learn how to add a row to the same table using an Instant Cloud Flow. PRE-REQUISITE Login to  Power Automate I will be using the Pizza Table which I created earlier, it must be available in the Dataverse. If you have not done this already, please use this link to create it 👉 Pizza Table . As an alternative, you may also choose to use any other table from Dataverse. STEP 1: Create a new Instant Cloud flow which can be triggered manually. STEP 2:  Add a new step to Add a new Row in Microsoft Dataverse. STEP 3:  Search and choose Pizzas  table. STEP 4:  Click on Show Advanced Options and add the values shown in the screenshot below. STEP 5:  Save the flow and Test it! Once the flow has run successfully, we have to check if tha

Power Automate Boolean Variable [Condition]

  BOOLEAN VARIABLE WITH CONDITION I promise this one is very simple and quick. We learn to use Boolean variable and the If condition in Power Automate Flows. As a first step, we have to be logged into  Power Automate  using the  Work-School Account  and create a new manually triggered cloud flow. In this demonstration, I create a small flow which tells us if we are going out for dessert or staying in and chilling! Let's get into it! STEP 1:  Expand "Manually trigger a flow". +Add an input. Select Yes/No and give it a name. STEP 2:  New Step > Initialize Variable. Give it a name and type String. STEP 3:  Add New Step. Search and select Condition from under Control. STEP 4:  Notice that 2 branches are automatically added for true and false condition. In Choose a value, give the variable we created in Step 1. Select "is equal to" from drop-down. Give "true" from the Expression tab in right-most textbox. STEP 5:  Set the appropriate values to the string