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...
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 variable that was created in Step 2, based on whether the condition in true or false.
If Yes, "We are going to get dessert"
If No, "We are chilling and staying in"
Also, notice in the gif below, how I copy pasted the "Set Variable" action and modified it.
TESTING THE FLOW
Test 1: Want Dessert? = Yes
Test 2: Want Dessert? = No
QUICK NOTE:
Assign value to Boolean Variable: If you want to assign a true/false value to a variable, that can be done via the Expression tab.
Please leave a comment if you would want me to cover any specific topic.
Comments
Post a Comment